如何去除行?标记而不是r中的n
我在R中有一个数据框,但是有NA有问号。因此,使用na.omit行不通。如何去除行?在其中。
谢谢
I have a dataframe in r, but instead of NA, there is question mark. So using na.omit doesn't work. How can i remove rows having ? in it.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
然后,您可以使用
na.omit()
then you can use
na.omit()
将问号转换为NA
另一个选项是使用
na_if
:输出:数据
Another option is converting the question mark to NA using
na_if
:Output:
Data
使用
rowsums
尝试一下Try it with
rowSums