subscript2d: Uniform Rectangular Data Subscripting Function

Description Usage Arguments Value See Also Examples

Description

subscript2d is for subscripting matrices and data frames.

Usage

1
2
3

Arguments

x

a matrix or data frame

i

first (row) subscript.

j

second (column) subscript.

Value

subscript2d(x,i,j) is like x[i,j,drop=F], except that it allows x[,1] (for example) for atomic vectors as well, and it always returns an object of the same class as x (that is, it does not support a drop argument).

See Also

as.data.frame, matrix.

Examples

1
2
3
4
x <- 1:10
subscript2d(x,3,1)
subscript2d(data.frame(x),3,1)
subscript2d(matrix(x),3,1)

splus2R documentation built on May 2, 2019, 5:24 p.m.

Related to subscript2d in splus2R...