Reading text file with multiple space as delimiter in R

后端 未结 3 1015

I have big data set which consist of around 94 columns and 3 Million rows. This file have single as well as multiple spaces as delimiter between columns. I need to read som

3条回答
  •  孤街浪徒
    2020-12-08 00:30

    If you want to use the tidyverse (or readr respectively) package instead, you can use read_table instead.

    read_table(file, col_names = TRUE, col_types = NULL,
      locale = default_locale(), na = "NA", skip = 0, n_max = Inf,
      guess_max = min(n_max, 1000), progress = show_progress(), comment = "")
    

    And see here in the description:

    read_table() and read_table2() are designed to read the type of textual data where
    each column is #' separate by one (or more) columns of space.
    

提交回复
热议问题