Learn R Programming

PhenStat (version 2.6.0)

dim: Method "dim"

Description

Retrieve the number of rows (measures) and columns (parameters) for a PhenList object.

Usage

"dim"(x)

Arguments

x
an object of class PhenList

Value

Numeric vector of length 2. The first element is the number of rows (measures) and the second is the number of columns (parameters).

Details

These methods allow one to extract the size of phenotypic data objects in the same way that one would do for ordinary matrices. A consequence is that row and column commands nrow(x), ncol(x) and so on also work.

See Also

dim in the base package.

Examples

Run this code
    file <- system.file("extdata", "test1.csv", package="PhenStat")
    test <- PhenList(dataset=read.csv(file),
            testGenotype="Sparc/Sparc")
    dim(test)

Run the code above in your browser using DataLab