simInfo: R6 Class representing a simulation information

simInfoR Documentation

R6 Class representing a simulation information

Description

simInfo object store specific information of one simulation study.

Details

Details: simInfo object store specific information of one simulation study.

Public fields

simName

[character] Name of the simulation study

simGeno

[logical] Simulate marker genotype or not

simPheno

[logical] Simulate phenotypic values or not

nSimGeno

[numeric] Number of simulations for generating marker genome

nSimPheno

[numeric] Number of simulations for pseudo phenotypic values

nCoreMax

[numeric] Number of cores you can use for this simulation study

nCorePerGeno

[numeric] Number of cores used per simulation of marker genotype (optional)

nCorePerPheno

[numeric] Number of cores used per simulation of phenotypic values (optional)

saveDataFileName

[character] The name of the file (including path) that saves the data (if NULL, the data won't be saved)

Methods

Public methods


Method new()

Create a new simInfo object.

Usage
simInfo$new(
  simName = "Simulation Example",
  simGeno = TRUE,
  simPheno = TRUE,
  nSimGeno = NA,
  nSimPheno = NA,
  nCoreMax = NA,
  nCorePerGeno = NA,
  nCorePerPheno = NA,
  saveDataFileName = NULL,
  verbose = TRUE
)
Arguments
simName

[character] Name of the simulation study

simGeno

[logical] Simulate marker genotype or not

simPheno

simPheno [logical] Simulate phenotypic values or not

nSimGeno

[numeric] Number of simulations for generating marker genome (optional)

nSimPheno

[numeric] Number of simulations for pseudo phenotypic values (optional)

nCoreMax

[numeric] Number of cores you can use for this simulation study (optional)

nCorePerGeno

[numeric] Number of cores used per simulation of marker genotype (optional)

nCorePerPheno

[numeric] Number of cores used per simulation of phenotypic values (optional)

saveDataFileName

[character] The name of the file (including path) that saves the data (if NULL, the data won't be saved) (optional)

verbose

[logical] Display info (optional)

Returns

A new 'simInfo' object.

Examples
mySimInfo <- simInfo$new(simName = "Simulation Example",
                         simGeno = TRUE,
                         simPheno = TRUE,
                         nSimGeno = 1,
                         nSimPheno = 3,
                         nCoreMax = 4,
                         nCorePerGeno = 1,
                         nCorePerPheno = 3,
                         saveDataFileName = NULL)
print(mySimInfo)

Method print()

Display information about the object

Usage
simInfo$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
simInfo$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `simInfo$new`
## ------------------------------------------------

mySimInfo <- simInfo$new(simName = "Simulation Example",
                         simGeno = TRUE,
                         simPheno = TRUE,
                         nSimGeno = 1,
                         nSimPheno = 3,
                         nCoreMax = 4,
                         nCorePerGeno = 1,
                         nCorePerPheno = 3,
                         saveDataFileName = NULL)
print(mySimInfo)

KosukeHamazaki/myBreedSimulatR documentation built on Aug. 31, 2024, 3:55 p.m.