Foverlaps错误:如果(any(x [[xintervals [2L]]]-x [[xintervals [1L]]]< 0L)停止时出错 [英] Foverlaps error: Error in if (any(x[[xintervals[2L]]] - x[[xintervals[1L]]] < 0L)) stop

查看:50
本文介绍了Foverlaps错误:如果(any(x [[xintervals [2L]]]-x [[xintervals [1L]]]< 0L)停止时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以成功地将 foverlaps 与我的数据集的一小部分一起使用,但是当使用完整数据(具有超过3万行的data.tables)时,它会崩溃并抛出以下错误:

I can successfully use foverlaps with a small sample of my dataset, but when use the full data (data.tables with over 30k rows), it breaks down and throws the following error:

错误消息:

Error in if (any(x[[xintervals[2L]]] - x[[xintervals[1L]]] < 0L)) stop("All entries in column ",  :
  missing value where TRUE/FALSE needed

我解释错误消息的方式是两个data.tables之间没有重叠。

The way I am interpreting the error message is that there are no overlaps between the two data.tables.

第1季度-我对消息的理解很好吗?

Q1-Am I interpreting the message well?

第2季度-知道为什么更大的数据集会发生这种情况吗?

Q2-Any idea why this might happen with the larger dataset? Is it possible that this is due to the size of the dataset?

我确实有很多唯一值,根据 overlaps 帮助文件,可以按预期速度放慢速度,但是在进入数百万行之前不会放慢速度,这在这里远非如此。

I do have a lot of unique values, which according to foverlaps help file, can be expected to slow things down proportionally, but not before it get into millions of rows, which is far from being the case here. Thank you.

推荐答案

没有可复制的示例,因此无法调查您的问题。

正如Carl在评论中所述,很可能是由NA值引起的
在最近的开发版本中,Arun对翻盖进行了一些改进。这些改进之一是在检测到NA值时更好的错误消息。

There is no reproducible example so it is not possible to investigate your issue.
As stated by Carl in comment it is likely caused by NA values present in input.
In the recent development version there has been some improvements made to foverlaps by Arun. One of those improvements is better error message when NA values are detected.

install.packages("data.table")

此功能自1.12.2起已在CRAN上。

This feature is already on CRAN as of 1.12.2.

这篇关于Foverlaps错误:如果(any(x [[xintervals [2L]]]-x [[xintervals [1L]]]&lt; 0L)停止时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆