Learn R Programming

simstudy (version 0.1.1)

defDataAdd: Add single row to definitions table that will be used to add data to an existing data.table

Description

Add single row to definitions table that will be used to add data to an existing data.table

Usage

defDataAdd(dtDefs = NULL, varname, formula, variance = 0, dist = "normal", link = "identity")

Arguments

dtDefs
Definition data.table to be modified
varname
Name (string) of new variable
formula
An R expression for mean (string)
variance
Number
dist
Distribution. For possibilities, see details
link
The link function for the mean, see details

Value

A data.table named dtName that is an updated data defnitions table