Maximum number of columns that can be read using read.csv
问题 I want to read a csv file of 4000 columns and 3000 rows and rows are of different length. Now i'm using the code below to read, but the maximum number of columns can be read is 2067. read_data <- function(filename) { setwd(dir) no_col <- max(count.fields(filename, sep = ",")) temp_data <- read.csv(filename, header = FALSE, sep = ",", row.names = NULL, na.strings = 0, fill = TRUE, col.names=1:no_col) How do I solve this problem? 来源: https://stackoverflow.com/questions/33195978/maximum-number