我正在尝试用来readr::read_fwf
读入 .txt 文件。我知道所有的列宽,但我收到了这个解析错误,我不知道如何解决:
fwf_widths <- c(12, 2, 6, ...)
fwf_names <- c("V1", "V2", "V3", ...)
col_types <- c("ccc...")
df <- read_fwf(file = file, fwf_widths(fwf_widths, fwf_names),
col_types = col_types)
Warning: 1 parsing failure.
row col expected actual file
372722 description embedded null /path/to/my/file.txt
我试过添加trim_ws = T
哪个不能消除错误。我查看了实际内容,df[372722, ]
它看起来description
包含正确的内容。有人可以帮我解释什么 embedded null
意思以及我可以如何处理这个问题吗?