recodeValuesDS1 {dsBase}R Documentation

recodeValuesDS1 an aggregate function called by ds.recodeValues

Description

First serverside function called by ds.recodeValues to convert specified values of elements in a vector into a matched set of alternative specified values.

Usage

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

Arguments

var.name.text

a character string providing the name for the vector representing the variable to be recoded. The <var.name.text> argument is generated and passed directly to recodeValuesDS2 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 recodeValuesDS2 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 parser in Opal and so can be accepted by recodeValuesDS1

new.values.text

a character string specifying the new values to which the specified values in the vector identified by the <var.name> argument are to be converted. The <new.values.text> argument is generated and passed directly to recodeValuesDS2 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 parser in Opal and so can be used in the call to recodeValuesDS1

Details

For all details see the help header for ds.recodeValues

Value

This first serverside function called by ds.recodeValues provides first level traps for a comprehensive series of disclosure risks which can be returned directly to the clientside because recodeValuesDS1 is an aggregate function. The second serverside function called by ds.dataFrameSubset (recodeValuesDS2) carries out some of the same disclosure tests, but it is an assign function because it writes the recoded vector to the serverside. In consequence, it records error messages as studysideMessages which can only be retrieved using ds.message

Author(s)

DataSHIELD Development Team


[Package dsBase version 5.0.0 ]