View source: R/data-management.R
| appenddata | R Documentation |
Appends data frames or files below a master data frame. Active data is used as master when available.
appenddata(
...,
data = NULL,
source = NULL,
force = FALSE,
active = TRUE,
quiet = FALSE,
labels = c("factor", "labelled", "numeric")
)
... |
Data frames or existing file paths to append. |
data |
Optional explicit master data frame. |
source |
|
force |
Logical; convert incompatible columns to character. |
active |
Logical; replace active data with the result. |
quiet |
Logical; suppress messages. |
labels |
Label handling when a file is opened. |
Columns are aligned by name. Missing columns are filled with NA. If no
active data and no explicit data are supplied, the first object in ...
becomes master.
The appended data frame invisibly.
before <- data.frame(id = 1:2, age = c(20, 30))
after <- data.frame(id = 3:4, age = c(40, 50), sex = c("M", "F"))
usedf(before, quiet = TRUE)
appenddata(after, source = TRUE, quiet = TRUE)
combined <- usedf(quiet = TRUE)
combined2 <- appenddata(before, after, active = FALSE, quiet = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.