| jlview_sparse | R Documentation |
Creates a dgCMatrix-class backed by a zero-copy ALTREP
vector for the nonzero values (x slot). The row indices (i
slot) and column pointers (p slot) are copied and shifted from
1-based (Julia) to 0-based (R) indexing in Julia, then returned as plain
R integer vectors.
jlview_sparse(julia_sparse_matrix, lazy_indices = FALSE)
julia_sparse_matrix |
A JuliaObject referencing a Julia
|
lazy_indices |
Ignored. Retained for API compatibility only. Previously controlled lazy vs eager materialization of ALTREP index vectors, which have been removed in favor of simple copy+shift in Julia. |
A dgCMatrix-class sparse matrix.
## Not run:
JuliaCall::julia_setup()
JuliaCall::julia_command("using SparseArrays")
m <- JuliaCall::julia_eval("sprand(Float64, 100, 50, 0.1)")
s <- jlview_sparse(m)
class(s) # "dgCMatrix"
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.