recodeValuesDS {dsBase}R Documentation

recodeValuesDS an assign function called by ds.recodeValues

Description

This function recodes specified values of elements in a vector into a matched set of alternative specified values.

Usage

recodeValuesDS(
  var.name.text = NULL,
  values2replace.text = NULL,
  new.values.text = NULL,
  missing = NULL
)

Arguments

var.name.text

a character string providing the name for the vector representing the variable to be recoded. <var.name.text> argument generated and passed directly to recodeValuesDS by ds.recodeValues

values2replace.text

a character string specifying the values in the vector specified by the argument <var.name.text> that are to be replaced by new values as specified in the new.values.vector. The <values2replace.text> argument is generated and passed directly to recodeValuesDS by ds.recodeValues. In effect, the <values2replace.vector> argument of the ds.recodeValues function is converted to a character string format that is acceptable to the DataSHIELD R parser in the data repository and so can be accepted by recodeValuesDS

new.values.text

a character string specifying the new values to which the specified values in the vector <var.name> are to be converted. The <new.values.text> argument is generated and passed directly to recodeValuesDS by ds.recodeValues. In effect, the <new.values.vector> argument of the ds.recodeValues function is converted to a character string format that is acceptable to the DataSHIELD R parser in the data repository and so can be used in the call to recodeValuesDS.

missing

if supplied, any missing values in the variable referred to by var.name.text will be replaced by this value.

Details

For all details see the help header for ds.recodeValues

Value

the object specified by the <newobj> argument (or default name '<var.name>_recoded') initially specified in calling ds.recodeValues. The output object (the required recoded variable called <newobj> is written to the serverside.

Author(s)

Paul Burton, Demetris Avraam for DataSHIELD Development Team


[Package dsBase version 6.1.1 ]