R 基本示例不适用于ffbase包中的ffwhich
我正在尝试使用OHDSI:s版本的R 基本示例不适用于ffbase包中的ffwhich,r,ff,ffbase,R,Ff,Ffbase,我正在尝试使用OHDSI:s版本的Self-Controlled CaseSeries包,它利用ff包来处理大数据。但是,ffwhich函数不起作用。运行ffwhich文档中提供的以下示例: install.packages("ff") install.packages("ffbase") x <- ff::ff(10:1) idx <- ffbase::ffwhich(x, x < 5) 关于如何修复此问题,您有什么想法吗?在软件包上报告了一个类似的错误。似乎是操作系统(W
Self-Controlled CaseSeries
包,它利用ff
包来处理大数据。但是,ffwhich
函数不起作用。运行ffwhich
文档中提供的以下示例:
install.packages("ff")
install.packages("ffbase")
x <- ff::ff(10:1)
idx <- ffbase::ffwhich(x, x < 5)
关于如何修复此问题,您有什么想法吗?在软件包上报告了一个类似的错误。似乎是操作系统(Windows 10?)的问题@jwijffels在评论中提供了原因: 我自己没有windows 10机器,但问题显然来自ff::chunk,即ff::chunk.ff_向量,定义如下 相关部分如下:b
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
options("ffbatchbytes"= getOption("ffmaxbytes")/2)
options(fftempdir="C:/Users/OskarG/Desktop/ff_files")
library("ff")
library("ffbase")
options(ffbatchbytes = 84882227) #add this line in
x <- ff::ff(10:1)
idx <- ffwhich(x, x < 5)
x[idx][]
[1] 4 3 2 1 #output