subset.multidna: Subset multidna objects

Description Usage Arguments Author(s) Examples

Description

Individuals in a multidna or multiphyDat object can be subsetted like the rows of a matrix, with the form x[i,]. Genes can be subsetted like the columns of a matrix, i.e. with the form x[,j].

Usage

1
2
3
4
5
## S4 method for signature 'multidna,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'multiphyDat,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]

Arguments

x

the multidna object to subset.

i

a vector of logical, integers or characters to subset data by individuals; characters will be matched against individual labels.

j

a vector of logical, integers or characters to subset data by genes; characters will be matched against gene names labels.

...

further arguments to be passed to other methods; currently ignored.

drop

present for compatibility with the generic; currently not used.

Author(s)

Thibaut Jombart t.jombart@imperial.ac.uk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(woodmouse)
genes <- list(gene1=woodmouse[,1:500], gene2=woodmouse[,501:965])
x <- new("multidna", genes)
x
plot(x)

## keep only the first 5 individuals
x[1:5,]
plot(x[1:5,])

## keep individuals 2,4,6 and the second gene
x[c(2,4,6),2]
plot(x[c(2,4,6),2])

apex documentation built on April 14, 2020, 5:32 p.m.