sampleObs {tileHMM} | R Documentation |
Draws a sample of given size from a discrete or continuous probability distribution.
## S4 method for signature 'discDist, numeric': sampleObs(dist, size, ...) ## S4 method for signature 'tDist, numeric': sampleObs(dist, size, ...)
dist |
Object of class discDist or tDist . The probability distribution to use. |
size |
Sample size. |
... |
Additional arguments. |
Vector of sampled values.
Peter Humburg
## sampling from a t distribution tdist <- new("tDist",mean=0,var=1,df=3) obs <- sampleObs(tdist,100) ## sampling from a discrete distribution nucleo <- new("discDist",alpha=c("A","C","G","T"),prob=rep(0.25,times=4)) dna <- sampleObs(nucleo,100)