r数据。表壁功能以抑制警告消息

发布于 2025-02-01 03:16:25 字数 479 浏览 2 评论 0原文

我想将一些文本文件用fread导入。这是一个示例:

fread(text="a,b\nID_134235,'J'aime'\nID_134235,'J,aime'",quote="'")

我必须指定quote =“'”,因为在第二列中,我可以在文本。

然后,我有一个警告消息:

警告(text =“ a,b \ nid_134235),'j'aime'\ nid_134235,'j,aime'”, QUOTE =“'”):在第100页中发现并解决了不当引用 行。如果未引用字段(例如,场分隔符 出现在任何字段),尝试Quote =“”以避免此警告。

我不想指定quote =“”,因为它会改变导入的性质。我只想抑制此消息。有办法做到吗? 实际上,我有数千个文件要读取,并且由于这些消息,R Studio界面似乎会功能障碍。

I want to import some text files with fread. Here is an example:

fread(text="a,b\nID_134235,'J'aime'\nID_134235,'J,aime'",quote="'")

I have to specify quote="'", because in the second column, I can have ' or , in the text.

Then I have a warning message:

Warning in fread(text = "a,b\nID_134235,'J'aime'\nID_134235,'J,aime'",
quote = "'") : Found and resolved improper quoting in first 100
rows. If the fields are not quoted (e.g. field separator does not
appear within any field), try quote="" to avoid this warning.

I don't want to specify quote="", because it changes the nature of the import. I just want to suppress this message. Is there a way to do it.
In fact, I have thousands of files to be read, and R Studio interface seems to dysfonction because of these messages.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文