get.atr {ILSAmerge} | R Documentation |
Retrieve tibble attributes
Description
Retrieves attributes from a tibble object created by haven.
Usage
get.atr(tibble, which, NULLasNA = TRUE, exact = FALSE)
get.nas(tibble, aslist = TRUE)
get.varlab(tibble)
Arguments
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. |
Value
A list or a data frame.
Examples
# 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,]
[Package ILSAmerge version 1.3.5 Index]