如何以char格式,空白,r中的curreny等混合变量清洁列
我有一个初创公司的数据集,其中我有一个称为“金额”的列,只不过是每个创业公司的估值。当我尝试绘制绘图时,绘图丑陋,我发现它们是“ char”格式的值彼此混合。您可以在此处看到示例图片:
我是R的初学者,我尝试了几个小型代码,但没有奏效。我想删除“字符串行”,“空白行”和“无数字的空$符号行”,然后将其余行转换为数字。
I have a dataset of startups, in which I have a column called "Amount" which is nothing but the valuations of each startup. when I tried to plot, the plot came out ugly and I found that those were in "char" format but when I tried to see the values in a column using table(copy$Amount)
it showed all values mixed to each other. u can see the example pics here:
I'm a beginner to R, I tried several small codes but nothing worked. I want to remove the "string rows", "blank row", and "empty $ symbol row without number" and convert the remaining rows into numbers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以从
Readr
软件包中使用parse_number
,其中:例如:
You can use
parse_number
from thereadr
package, which:For example: