[,multidna,ANY,ANY,ANY-method {apex}R Documentation

Subset multidna objects

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

## 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


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


[Package apex version 1.0.6 Index]