get.atr | R Documentation |
Retrieves attributes from a tibble object created by haven.
get.atr(tibble, which, NULLasNA = TRUE, exact = FALSE)
get.nas(tibble, aslist = TRUE)
get.varlab(tibble)
tibble |
a tibble object. |
which |
a non-empty character string specifying which attribute is to be accessed. |
NULLasNA |
a logical value indicating if |
exact |
logical: should |
aslist |
a logical value indicating if output should be a list. |
A list or a data frame.
# tibble generated by haven
input <- system.file("extdata/reds", package = "ILSAmerge")
x <- do.call(rbind,justload(inputdir = input,population = "BCGV1"))
x
# Get an attribute
get.atr(tibble = x, which = "label")[1:3]
get.atr(tibble = x, which = "labels")[1:3]
get.atr(tibble = x, which = "format.spss")[1:3]
# Get NAs
get.nas(tibble = x,aslist = TRUE)[10:20]
get.nas(tibble = x,aslist = FALSE)[10:20,]
# Get variable labels
get.varlab(tibble = x)[10:20,]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.