Description Usage Arguments Value Author(s) See Also Examples
Adds missing data to objects of class simAutoMarkers
or
simAutoCross
as specified either as a proportion of missing at
random or a proportion of columns and rows with specified proportions
of missings.
1 | addMissing(x, na.proportion = 0, parent.cols = c(1, 2), seed)
|
x |
object of class |
na.proportion |
proportion missing at random or a list with two components indiv and marker each containing c(prop. markers missing, prop. missing) (Default: 0) |
parent.cols |
columns containing parental markers (etc) not
altered only used if object of class |
seed |
random number generator (RNG) state for random number which will be set at start to reproduce results |
Returns object of class simAutoMarkers
or simAutoCross
, or a
matrix
with dominant markers scored as 0 or 1 with extra
component na.proportion
which has the following elements
na.proportion |
proportion missing at random or a list with two components indiv and marker each containing c(prop. markers missing, prop. missing) |
time.generated |
time/date when data set generated + when missing added |
seed |
random number generator seed which could be used to reproduce results (I hope) |
call |
matches arguments when function called |
Peter Baker p.baker1@uq.edu.au
addMisclass
misclassifies markers at random,
sim.autoMarkers
simulate autopolyploid markers,
sim.autoCross
simulate autopolyploid markers for a cross
1 2 3 4 5 6 7 | ## simulate autopolyploid markers
p1 <- sim.autoCross(4, dose.proportion=c(0.7,0.3), n.markers=20, n.indiv=10)
p2 <- sim.autoCross(4, dose.proportion=list(p01=c(0.7,0.3),p10=c(0.7,0.3),p11=c(
0.6,0.2,0.2)))
## add missings
addMissing(p2, 0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.