OHDSI Home | Forums | Wiki | Github

Issues with ff-package in the R-package SelfControlledCaseSeries

I’m trying to use the OHDSI version of the SelfControlledCaseSeries-package, which utilizes the ff-package to handle big data. But something is not working with the ffwhich-function. Running the following example, provided in the ffwhich-documentation:

install.packages(“ff”)
install.packages(“ffbase”)
x <- ff::ff(10:1)
idx <- ffbase::ffwhich(x, x < 5)

gives me

Error in if (by < 1) stop("‘by’ must be > 0") : missing value where TRUE/FALSE needed In addition: Warning message: In chunk.default(from = 1L, to = 5L, by = c(integer = 46116860184273880), : NAs introduced by coercion to integer range

I have tried setting batchbytes to something smaller, running the script on another computer and also changed the location where ff-files are stored, but the error remains.

options(“ffbatchbytes”= getOption(“ffmaxbytes”)/2)
options(fftempdir=“C:/Users/OskarG/Desktop/ff_files”)

Any ideas on how to fix this? Many thanks.

Apparently, this bug was known, and solved following the advice on this github-page:

t