[英]Foverlaps error: Error in if (any(x[[xintervals[2L]]] - x[[xintervals[1L]]] < 0L)) stop
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:我可以成功地将
foverlaps
与我的数据集的小样本一起使用,但是当使用完整数据(超过 30k 行的 data.tables)时,它会崩溃并抛出以下错误:
Error message:错误信息:
Error in if (any(x[[xintervals[2L]]] - x[[xintervals[1L]]] < 0L)) stop("All entries in column ", :
missing value where TRUE/FALSE needed
The way I am interpreting the error message is that there are no overlaps between the two data.tables.我解释错误消息的方式是两个 data.tables 之间没有重叠。
Q1-Am I interpreting the message well? Q1-我是否很好地解释了消息?
Q2-Any idea why this might happen with the larger dataset? Q2-知道为什么这可能会发生在更大的数据集上吗? Is it possible that this is due to the size of the dataset?
这可能是由于数据集的大小吗?
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.我确实有很多独特的值,根据
foverlaps
帮助文件,可以预期它们会按比例减慢速度,但不会在它进入数百万行之前,而这里的情况远非如此。 Thank you.谢谢你。
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.正如 Carl 在评论中所述,这可能是由输入中存在的 NA 值引起的。
In the recent development version there has been some improvements made to foverlaps
by Arun.在最近的开发版本中,Arun 对
foverlaps
进行了一些改进。 One of those improvements is better error message when NA values are detected.当检测到 NA 值时,这些改进之一是更好的错误消息。
install.packages("data.table")
This feature is already on CRAN as of 1.12.2.从 1.12.2 开始,此功能已经在 CRAN 上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.