ez.labels.get: get value labels, wrapper of 'sjmisc_get_labels'.

ez.labels.getR Documentation

get value labels, wrapper of sjmisc_get_labels.

Description

get value labels, wrapper of sjmisc_get_labels.

Usage

ez.labels.get(
  x,
  include.values = "n",
  attr.only = T,
  include.non.labelled = F,
  ...
)

ez.getlabels(
  x,
  include.values = "n",
  attr.only = T,
  include.non.labelled = F,
  ...
)

Arguments

x

df or var (I generally use x as var)

Details

see also sjmisc_get_values
include.values, how values are returned, as named vector = "as.name" or "n" or "as.prefix" or "p"
attr.only = T, only search attributes, T desired (if F, also search factor levels, character strings)
include.non.labelled, if T, values without labels (when less labels than values) will also be included in the returned labels
returns NULL if no value labels attribute

Note

returned vector values are the labels with vector names being initial values in x. This is flipped as you would get directly from attr(,"labels",exact=T)

See Also

gather, spread, separate, unite
select, slice
distinct, arrange
summarise, count, mutate
group_by, left_join, right_join, inner_join, full_join, semi_join, anti_join
intersect, union, setdiff
bind_rows, bind_cols

Other data transformation functions: ez.2char(), ez.2factor(), ez.2label(), ez.2long(), ez.2lower(), ez.2value(), ez.2wide(), ez.compute(), ez.del(), ez.label.get(), ez.label.set(), ez.labels.set(), ez.move(), ez.newcol(), ez.num(), ez.recode(), ez.recols(), ez.recol(), ez.rename(), ez.replace(), ez.rncols(), ez.rncol(), ez.select(), ez.sort(), ez.split(), ez.str(), ez.unique(), left_join()


jerryzhujian9/zmisc documentation built on March 9, 2024, 12:49 a.m.