crossprod | R Documentation |
Matrix Crossproduct
## S4 method for signature 'AbstractFArray,AbstractFArray' crossprod(x, y = NULL, weights = NULL, ...) ## S4 method for signature 'AbstractFArray,'NULL'' crossprod(x, y = NULL, weights = NULL, ...) ## S4 method for signature 'AbstractFArray,missing' crossprod(x, y = NULL, weights = NULL, ...) ## S4 method for signature 'AbstractFArray,matrix' crossprod(x, y = NULL, weights = NULL, ...)
x |
a |
y |
|
weights |
numeric vector used as weight |
... |
passed to further methods |
Matrix of cross product
x <- matrix(1:100, 50) crossprod(x) fmat_x <- as.fmatrix(x) crossprod(fmat_x)[] weights <- (1:50)/50 t(x) %*% diag(weights) %*% x crossprod(fmat_x, weights = weights) ## Not run: # large data set ~ 1.6GB x <- as.fmatrix(matrix(rnorm(2e8), ncol = 2)) crossprod(x) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.