matrix.subset | R Documentation |
Creates a subset of the matrix along an axis.
matrix.subset(mat, indices, axis = 1, n_threads = 1)
mat |
The |
indices |
Vector of indices to subset the matrix. |
axis |
The axis along which to subset (2 is columns, 1 is rows). |
n_threads |
Number of threads. |
Matrix subsetted along the appropriate axis. The object is an S4 class with methods for efficient computation by adelie.
James Yang, Trevor Hastie, and Balasubramanian Narasimhan
Maintainer: Trevor Hastie hastie@stanford.edu
n <- 100
p <- 20
X <- matrix.dense(matrix(rnorm(n * p), n, p))
indices <- c(1, 3, 10)
out <- matrix.subset(X, indices, axis=1)
out <- matrix.subset(X, indices, axis=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.