Maximum number of columns that can be read using r

2019-08-20 08:08发布

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?

标签: r csv large-data
0条回答
登录 后发表回答