Merge the datasets on the keys
merge_datasets.Rd
Usage
merge_datasets(
selector_list,
datasets,
merge_function = "dplyr::full_join",
anl_name = "ANL"
)
Arguments
- selector_list
(
reactive
)
output fromdata_extract_multiple_srv()
or a reactive named list of outputs fromdata_extract_srv()
. When using a reactive named list, the names must be identical to the shiny ids of the respectivedata_extract_ui()
.- datasets
(
FilteredData
)
object containing data (seeteal.slice::FilteredData
).- merge_function
(
character(1)
orreactive
)
A character string of a function that accepts the argumentsx
,y
andby
to perform the merging of datasets.- anl_name
(
character(1)
)
Name of the analysis dataset.
Value
merged_dataset (list
) containing:
data (
data.frame
) after filtering and reshaping containing selected columns.expr
(character
) code needed to replicate merged dataset.columns_source (
list
) of column selected for particular selector.keys (
list
) the keys of the merged dataset.filter_info (
list
) The information given by the user. This information defines the filters that are applied on the data. Additionally it defines the variables that are selected from the data sets.
Examples
if (FALSE) {
# inside teal module server function
response <- data_extract_srv(
id = "reponse",
data_extract_spec = response_spec,
datasets = datasets
)
regressor <- data_extract_srv(
id = "regressor",
data_extract_spec = regressor_spec,
datasets = datasets
)
merged_data <- merge_datasets(list(regressor(), response()))
}