bind_source {healthdb} | R Documentation |
Row-bind a list of data.frames or remote tables with variable selection and renaming
Description
Row bind a list of data.frames or remote tables with variable selection and renaming.
Usage
bind_source(data, ..., force_proceed = getOption("healthdb.force_proceed"))
Arguments
data |
A list of data.frame or remote tables, e.g., output from |
... |
Named arguments for each variable included in the output. The argument name should be the new name in the output, and the right hand side of the argument is a character vector of the original names. The name vector and the list elements in |
force_proceed |
A logical for whether to ask for user input in order to proceed when remote tables are needed to be collected for binding. The default is FALSE to let user be aware of that the downloading process may be slow. Use |
Value
A data.frame or remote table containing combined rows of the input list with variables specified by ...
Examples
df1 <- subset(iris, Species == "setosa")
df2 <- subset(iris, Species == "versicolor")
df3 <- subset(iris, Species == "virginica")
bind_source(list(df1, df2, df3),
s_l = "Sepal.Length",
s_w = "Sepal.Width",
p_l_setosa = c("Petal.Length", NA, NA),
p_l_virginica = c(NA, NA, "Petal.Length")
) %>%
head()