删除R中的列中的错误数据类型
谢谢您协助我。我是R的新手。我断言我所有的列类型都是正确的。
有一个列是一个字符类型,但是当我在其上行使count()时,我看到字符列中有一个数字值。这当然是一个错误。
我如何找出具有数字的观察结果,以便可以选择修改或删除单元格?我使用此代码来确定列包含的内容:
ned1%>%count(source_id),
但是告诉我行号的列标题为x,我不知道如何在x列上打电话,所以我知道包含错误的行号。
我希望我能很好地解释这一点,并感谢您的时间。如果我的新颖性阻止我给您更多信息,我深表歉意。
Thank you for assisting me. I am new to r. I have asserted that all my column types are correct.
There is a column that is a character type, but when I exercised count() on it, I saw that there is a number value in the character column. This is of course an error.
How do I find out the observation that has the number so that I can choose to modify or delete the cell? I used this code to determine what the column contained:
ned1 %>% count(source_id)
But the column that tells me the row number is titled X, and I do not know how to also call on the column X so I know the row number that contains the error.
I hope I explained this well enough, and I appreciate your time. I apologize if my newness has prevented me from giving you more information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
ned1
使用dplyr :: filtr()
和as.numeric()
过滤ned1
的行。You can filter the rows of
ned1
usingdplyr::filter()
andas.numeric()