createRecodedVar {exceldata}R Documentation

Create survival variables (survival duration + status)

Description

This function will create survival variables from an existing start variable date of event variable and last date followed variable

Usage

createRecodedVar(data, dictionary, newVarName, instructions)

Arguments

data

is data returned by the importExcelData or readExcelData functions

dictionary

is the data dictionary returned by importExcelData or readDataDict functions

newVarName

the name of the new variable.

instructions

are from the data dictionary

Details

The instructions are contained in the Levels column of the data dictionary and should be in the format:

original_varname,newCode1=oldcode1,oldCode2,...,newCode2=oldCode3,..

For Example: instructions="T_Stage,T0=T0,T1up=T1,T2,T3,T4"

will recode T1-T4 as T1up and retain T0 as is


[Package exceldata version 0.1.1.3 Index]