scbind | R Documentation |
scbind
allows one to bind columns together into a data.frame, while
preserving any labelr labels of the inputted data.frames.
scbind(...)
... |
data.frames to be column-bound |
Precedence is given to the labels of earlier-appearing arguments, such that, if both an earlier and a later data.frame include a label attribute with the same name, the attribute from the earlier data.frame will be preserved, and the same-named attribute later data.frame(s) will be discarded.
a data.frame.
# assign mtcars to df
df <- mtcars
# add value labels to "am"
df <- add_val_labs(
data = df,
vars = "am",
vals = c(0, 1),
labs = c("automatic", "manual")
)
# add numerical range value labels to "mpg"
df <- add_quant1(df, mpg, qtiles = 4)
df_a <- sselect(df, "am")
df_b <- sselect(df, "mpg")
df_c <- sselect(mtcars, "cyl")
df_all <- scbind(df_a, df_b, df_c)
head(df_all)
get_val_labs(df_all)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.