dipterix / filearray

Out-of-memory Arrays in R
https://dipterix.org/filearray/
17 stars 2 forks source link

Allow replacing portions of filearray by a single value #9

Closed talegari closed 3 months ago

talegari commented 4 months ago

Right now,

library("filearray")
file = tempfile()
fa_obj = filearray_create(file, dimension = c(100, 1), type = "double")
fa_obj[1:10, 1] = 1

throws this error (not surprising):

Error in fa_subsetAssign1(x, i, ..., value = value) : 
  SubsetAssign FileArray `value` length mismatch.

Request: I have an usecase where large portions of filearray need to be replaced by a single value. It would be great to allow this exception. Else, I will have create large arrays in memory and then replace it.

dipterix commented 4 months ago

Thanks for this. Let me take a look at what I can do.

dipterix commented 3 months ago

The feature request has been implemented in the dev package. Will be included in the next CRAN release.