Description Usage Arguments Details Value Author(s) Examples
Returns a matrix, whether requested via an R matrix, bigmemory
object, bigmemory
descriptor or quoted name form.
1 | getmatrix(m)
|
m |
Specification of the matrix, as either an R matrix, |
This utility function enables writing general Rdsm code, specifying a matrix via different forms.
The requested matrix.
Norm Matloff
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(parallel)
c2 <- makeCluster(2)
mgrmakevar(c2,"u",2,2) # u is a 2x2 bigmemory matrix
u[] <- 8 # fill u with 8s
u[] # prints a 2x2 matrix of 8s
v <- getmatrix(u) # get u and assign it to v
# u and v are both addresses, pointing to the same memory location
v[] # prints all 8s
v[2,1] <- 3
v[] # prints three 8s and a 3
u[] # prints three 8s and a 3
w <- getmatrix("u") # w will also be a copy of u
w[] # same as u
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.