profiles-extract: profiles extract

Description Usage Arguments Examples

Description

Profiles are stored in a profiles object, which is merely an integer matrix together with allelic frequencies stored as an attribute "freqs".

Usage

1
2
## S3 method for class 'profiles'
x[i,j,...]

Arguments

x

profiles object

i

vector or matrix

j

(optionally) vector

...

passed on to [.matrix

Examples

 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)])))

DNAprofiles documentation built on Jan. 15, 2017, 9:27 p.m.