【发布时间】:2021-10-22 11:41:32
【问题描述】:
我有 70 多个 CSV 文件,我正在尝试按行合并它们(它们都有相同的列)。我尝试使用以下代码将它们组合起来:
library(tidyverse)
library(plyr)
library(readr)
setwd("*\\data")
myfolder="test"
allfiles= list.files(path=myfolder, pattern="*.csv", full.names = T)
allfiles
combined_csv= ldply(allfiles, read.csv)
运行此代码后,我会收到一条警告消息:
Warning message:
In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
EOF within quoted string
看起来我丢失了一些行。我该如何解决这个问题?
【问题讨论】:
标签: r csv import merge read.csv