Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 基本示例不适用于ffbase包中的ffwhich_R_Ff_Ffbase - Fatal编程技术网

R 基本示例不适用于ffbase包中的ffwhich

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

我正在尝试使用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)

关于如何修复此问题,您有什么想法吗?

在软件包上报告了一个类似的错误。似乎是操作系统(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