Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/79.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 bigglm ffdf返回与大小相关的错误_R_Bigdata_Ff_Ffbase - Fatal编程技术网

R bigglm ffdf返回与大小相关的错误

R bigglm ffdf返回与大小相关的错误,r,bigdata,ff,ffbase,R,Bigdata,Ff,Ffbase,我试图使用ffbase中的bigglm.ffdf在ffdf上运行逻辑回归模型,但我得到一个错误: x1 = as.ff(sample(0:5, 400, replace=T)) x2 = as.ff(sample(c(rep(0, 98), rep(1, 2)), 400, replace=T) ) df2 = ffdf(x1, x2) mod = bigglm.ffdf(x2 ~ x1, family = binomial(), data = df2) > Error in R[ok,

我试图使用ffbase中的
bigglm.ffdf
ffdf
上运行逻辑回归模型,但我得到一个错误:

x1 = as.ff(sample(0:5, 400, replace=T))
x2 = as.ff(sample(c(rep(0, 98), rep(1, 2)), 400, replace=T) )
df2 = ffdf(x1, x2)
mod = bigglm.ffdf(x2 ~ x1, family = binomial(), data = df2)

> Error in R[ok, ok] <- chol2inv(R[ok, ok, drop = FALSE]) : 
  number of items to replace is not a multiple of replacement length

使用运行biglm_0.9-1、ffbase_0.11.1、ff_2.2-11的R3.0.2,使用
set.seed(1212)
(但它确实抱怨不收敛)无法复制此结果。也许可以尝试提供
set.seed
,以使错误的示例完全重现,和/或尝试更新包,看看错误是否消失。奇怪。我在一个新的会话上运行代码,它确实有效(由于数据是随机的,所以非转换警告没有问题)。尽管如此,它对我现有的会话不起作用,在那里已经创建了很多对象。为什么会这样?我也不能重现这个问题。您的代码在我的设置(biglm_0.9-1、ffbase_0.9、ff_2.2-12)中运行良好。也许rm(x1,x2)会有帮助?谢谢大家。主持人应删除此问题。我的治疗过程中发生了一些奇怪的事情。道歉。
x5 = sample( 0:5, 400, replace=T)
x6 = sample(c(rep(0, 98), rep(1, 2)), 400, replace=T)
df3 = data.frame(x5, x6)
mod = glm(x6 ~ x5, family = binomial(), data = df3)
# no error