asthistibble | R Documentation |
Converts a data frame into a tibble copying all attributes.
asthistibble(tibble, x)
tibble |
a tibble object. |
x |
a data frame with the same columns of |
A tibble.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.