Description Usage Arguments Examples
Profiles are stored in a profiles object, which is merely an integer matrix together with allelic frequencies stored as an attribute "freqs".
1 2 | ## S3 method for class 'profiles'
x[i,j,...]
|
x |
profiles object |
i |
vector or matrix |
j |
(optionally) vector |
... |
passed on to |
1 2 3 4 5 6 7 8 9 10 | data(freqsNLsgmplus)
x <- sample.profiles(N=10,freqsNLsgmplus)
y <- unclass(x);attr(y,"freqs") <- NULL
stopifnot(identical(as.vector(x[1,]),as.vector(y[1,])))
stopifnot(identical(as.vector(x[1:10]),as.vector(y[1:10])))
stopifnot(identical(as.vector(x[5,5]),as.vector(y[5,5])))
stopifnot(identical(as.vector(x[,1:10]),as.vector(y[,1:10])))
stopifnot(identical(as.vector(x[,]),as.vector(y[,])))
stopifnot(identical(as.vector(x[cbind(2,1:10)]),as.vector(y[cbind(2,1:10)])))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.