I am trying to execute a select query on a small data frame using "sqldf" library and getting the below error:
我正在尝试使用“sqldf”库对一个小数据帧执行select查询,并得到以下错误:
( (Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Error during wrapup: evaluation nested too deeply: infinite recursion / options(expressions=)? )
(错误:评估嵌套太深:无限递归/选项(表达式=)?wrapup期间的错误:评估嵌套太深:无限递归/选项(表达式=)?
Tried options(expressions=500000) then it is throwing Cstack Overflow error.
尝试选项(表达式=500000),然后抛出Cstack溢出错误。
In the data frame there is column with "Date" and formatted that in date format in R.
在数据框架中,有一个带有“Date”的列,并格式化为R中的日期格式。
If we consider that column as "char" we are not facing any error and getting the output.
如果我们把这个列看作“char”,那么我们就不会遇到任何错误并得到输出。
In-fact the same data frame and same R code are working in few systems and in few it not. not understanding the issue, all the systems are same configuration and same OS.
事实上,相同的数据框架和相同的R代码在很少的系统中工作,而在很少的系统中却没有。不理解这个问题,所有的系统都是相同的配置和操作系统。
Please help me in this.... Thanks in advance.
请帮我在这....提前谢谢。
Yugandhar
Yugandhar
1 个解决方案
#1
2
I was having exactly the same problem with a date converted from a char field.
我遇到了与从char字段转换的日期完全相同的问题。
I resolved it by casting the dates to a factor as well, like (in data.table language):
我通过将日期转换成一个因素来解决它,比如(在数据中)。表语言):
table[,ActualDate:=as.factor(as.date(CharacterDate))]
Hope that helps
希望这有助于
Andy.
安迪。
#1
2
I was having exactly the same problem with a date converted from a char field.
我遇到了与从char字段转换的日期完全相同的问题。
I resolved it by casting the dates to a factor as well, like (in data.table language):
我通过将日期转换成一个因素来解决它,比如(在数据中)。表语言):
table[,ActualDate:=as.factor(as.date(CharacterDate))]
Hope that helps
希望这有助于
Andy.
安迪。