在 sqldf
中使用 SQL 时,如何识别 Inf
、-Inf
?
示例数据:
x <- data.frame(val = c(1, 2, 3, Inf))
现在,我正在使用:
sqldf('select * from x where val < 999999999999999999999')
但这似乎不太安全。
最佳答案
试试这个:
> sqldf("select val from x where cast(val as text) != 'Inf'")
val
1 1
2 2
3 3
关于r - 在 sqldf 中识别 Inf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27876884/