gpt4 book ai didi

r - 为什么我会收到 Can't make a table of more 2^31 elements in R 的错误

转载 作者:行者123 更新时间:2023-12-01 19:54:45 25 4
gpt4 key购买 nike

您好,我在 R 中有一个数据框记录,维度为 8 obs 60 个变量,缺失值被 NA 替换,其他值是单词。

当我尝试将数据框制成表格时 feeds<-table(record)我收到一条错误消息:

Error in table(record) : attempt to make a table with >= 2^31 elements

我的数据框的一些示例元素/结构是

INC - CORP Application Issue    INC - CORP Issue    INC - PC Software Issue
Affected User Affected User Affected User
Attachment Attachment Attachment
Description / Priority Business Critica.. Configuration Item
Knowledge Search Client ID Contact Info
NA Description / Pr.. NA

我不明白这个错误,因为数据框中的元素显然不接近 2^31。

感谢您的宝贵时间。

最佳答案

这是一个老话题,但它可能会帮助其他人,这也是我发布它的原因。我遇到了同样的问题,我从我不记得的地方找到了在线解决方案,它对我来说非常有效。希望对有需要的人有用。

solution<-as.data.frame(table(unlist(record)))

关于r - 为什么我会收到 Can't make a table of more 2^31 elements in R 的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28720814/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com