Description Usage Arguments Value See Also Examples
subscript2d is for subscripting matrices and data frames.
1 2 3 | subscript2d(x,i,j)
subscript2dMatrix(x,i,j)
subscript2dDataFrame(x,i,j)
|
x |
a matrix or data frame |
i |
first (row) subscript. |
j |
second (column) subscript. |
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).
1 2 3 4 | x <- 1:10
subscript2d(x,3,1)
subscript2d(data.frame(x),3,1)
subscript2d(matrix(x),3,1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.