Learn R Programming

strum (version 0.2)

simulateStrumData: Simulate strumData Object

Description

A function to create a strumData object containing the simulated data according to the simulation model.

Usage

simulateStrumData(simModel, inData=NULL, N=NULL)

Arguments

simModel
Object of class strumSimModel.
inData
Object of class strumData, data.frame, or NULL.
N
A positive interger number to specify the particular size of simulated data or NULL.

Value

  • Returns an object of class strumData.

Details

This function is used to simulate a data according to the specified simulation model. Note that either inData or N, or both must be specified.

See Also

strumSimModel, strumData

Examples

Run this code
# Simulate a strumData object with different type of input data.
# - mySimModel is an object of strumSimModel class.
# - dF is a data.frame containing input data.
# - rawStrumData is an object of "RawData" type strumData class.
# - pedStrumData is an object of "Pedigree" type strumData class.
#-----------------------------------------------------------------
myStrumData = simulateStrumData(mySimModel, N=1000)
myStrumData = simulateStrumData(mySimModel, dF)
myStrumData = simulateStrumData(mySimModel, rawStrumData)
myStrumData = simulateStrumData(mySimModel, pedStrumData)

Run the code above in your browser using DataLab