Creates an fmalloc-backed ALTREP array in a single step by allocating vector storage and installing array dimensions (and optional dimnames).
Usage
create_fmalloc_array(
type = "integer",
dim,
dimnames = NULL,
runtime = NULL,
zero_initialize = TRUE
)Arguments
- type
Character string specifying the vector type. Supported values are the same as for
create_fmalloc_vector().- dim
Integer dimension vector.
- dimnames
Optional
dimnamesfor the array.- runtime
Optional runtime handle returned by
open_fmalloc(). If not supplied, the default runtime established byinit_fmalloc()is used.- zero_initialize
Logical scalar passed through to payload allocation. See
create_fmalloc_vector()for semantics.
Examples
if (FALSE) { # \dontrun{
rt <- open_fmalloc(tempfile(fileext = ".bin"))
a <- create_fmalloc_array("numeric", dim = c(2L, 3L), runtime = rt)
cleanup_fmalloc(rt)
} # }