A <- mmatrix("short", 10, 20)
A[] <- sample.int(200)
# create descriptor file
dsc <- descriptor.file(A)
# linking file to other object
B <- read.descriptor(dsc, readonly = FALSE)
all(as.matrix(A) == as.matrix(B)) # TRUE
B[1:10] <- 0
all(A[1:10] == 0) # TRUE
Run the code above in your browser using DataLab