Learn R Programming

CorrBin (version 1.6.2)

Extract: Extract from a CBData or CMData object

Description

The extracting syntax works as for [.data.frame, and in general the returned object is not a CBData or CMData object. However if the columns are not modified, then the result is still a CBData or CMData object with appropriate attributes preserved, and the unused levels of treatment groups dropped.

Usage

# S3 method for CBData
[(x, i, j, drop)

# S3 method for CMData [(x, i, j, drop)

Value

a CBData or CMData object

Arguments

x

CMData object.

i

numeric, row index of extracted values

j

numeric, column index of extracted values

drop

logical. If TRUE the result is coerced to the lowest possible dimension. The default is the same as for [.data.frame: to drop if only one column is left, but not to drop if only one row is left.

Author

Aniko Szabo

See Also

CBData, CMData

Examples

Run this code

data(shelltox)
str(shelltox[1:5,])
str(shelltox[1:5, 2:4])

data(dehp)
str(dehp[1:5,])
str(dehp[1:5, 2:4])

Run the code above in your browser using DataLab