【问题标题】:Data Importation in R but change the delimiter from comma to semicolonR中的数据导入,但将分隔符从逗号更改为分号
【发布时间】:2022-01-17 15:22:56
【问题描述】:

我想通过打开文件将数据导入中的分隔符从逗号 (,) 更改为分号 (;),它工作得非常好,但是当我想加载数据时通过代码行,出现错误enter image description here

【问题讨论】:

  • 欢迎来到 SO。请不要使用数据图像,因为没有大量不必要的努力就无法使用它们。 For multiple reasons

标签: r csv readr


【解决方案1】:

尝试不使用delim=";" 也避免在delim=";" 之前使用+

例子:

library(readr)

    example <- read_delim("example.csv", ";", 
        escape_double = FALSE, trim_ws = TRUE)

【讨论】:

  • 非常感谢:)
猜你喜欢
  • 2016-03-13
  • 1970-01-01
  • 1970-01-01
  • 2010-11-17
  • 1970-01-01
  • 2017-02-23
  • 2018-04-02
  • 1970-01-01
  • 2020-11-02
相关资源
最近更新 更多