ds.dataFrameFill {dsBaseClient}R Documentation

ds.dataFrameFill calling dataFrameFillDS

Description

Adds extra columns with missing values in a dataframe one for each variable is not included in the dataframe but is included in the relevant datafram of another datasource.

Usage

ds.dataFrameFill(df.name = NULL, newobj = NULL, datasources = NULL)

Arguments

df.name

a character string representing the name of the input data frame that will be filled with extra columns with missing values if a number of variables is missing from it compared to the data frames of the other studies used in the analysis.

newobj

a character string providing a name for the output data frame which defaults to the name "dataframefill.newobj" if no name is specified.

datasources

specifies the particular opal objects to use. If the datasources argument is not specified the default set of opals will be used. The default opals are called default.opals and the default can be set using the function ds.setDefaultOpals.

Details

This function checks if the input data frames have the same variables (i.e. the same column names) in all of the used studies. When a study does not have some of the variables, the function generates those variables as vectors of missing values and combines them as columns to the input data frame. Then, the "complete" in terms of the columns dataframe is saved in each server with a name specified by the argument newobj.

Value

The object specified by the newobj argument which is written to the serverside. In addition, two validity messages are returned indicating whether the newobj has been created in each data source and if so whether it is in a valid form.

Author(s)

Demetris Avraam for DataSHIELD Development Team


[Package dsBaseClient version 5.1.0 ]