addMissing function

Adds missing data to objects of class autoMarker or autoCross

Adds missing data to objects of class autoMarker or autoCross

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.

addMissing(x, na.proportion = 0, parent.cols = c(1, 2), seed)

Arguments

  • x: object of class simAutoMarkers or simAutoCross, or a matrix with dominant markers scored as 0 or 1
  • 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 simAutoCross
  • seed: random number generator (RNG) state for random number which will be set at start to reproduce results

Returns

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

Author(s)

Peter Baker p.baker1@uq.edu.au

See Also

addMisclass misclassifies markers at random, sim.autoMarkers simulate autopolyploid markers, sim.autoCross simulate autopolyploid markers for a cross

Examples

## 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)
  • Maintainer: Peter Baker
  • License: GPL-3
  • Last published: 2018-03-22

Useful links