Have find original question and solution here: Importing multiple .csv files into R
solution is:
temp = list.files(pattern="*.csv")
list2env(
lapply(setNames(temp, make.names(gsub("*.csv$", "", temp))),
read.csv), envir = .GlobalEnv)
but I want to add one condition to read.csv
, row.names=1
--the first column is row name
then the solution does not work anymore. Any suggestion?
was using:
temp = list.files(pattern="*.csv")
list2env(
lapply(setNames(temp, make.names(gsub("*.csv$", "", temp))),
read.csv(row.names=1)), envir = .GlobalEnv)
Thank you!