asthistibble {ILSAmerge} | R Documentation |
Copy tibble attributes
Description
Converts a data frame into a tibble copying all attributes.
Usage
asthistibble(tibble, x)
Arguments
tibble |
a tibble object. |
x |
a data frame with the same columns of |
Value
A tibble.
Examples
# tibble generated by haven
input <- system.file("extdata/reds", package = "ILSAmerge")
tib <- do.call(rbind,justload(inputdir = input,population = "BCGV1"))
# Remove all tibble attributes
x <- tib
class(x) <- "data.frame"
for(i in 1:ncol(x)){
attributes(x[,1]) <- NULL
}
# Mix variables
set.seed(1919)
x <- x[,sample(ncol(x))]
head(x)[,1:10]
tib
asthistibble(tibble = tib, x = x)
[Package ILSAmerge version 1.3.8 Index]