Reading CSVs

What is the difference between read.csv() and read_csv() in R?

From this article:

The read_csv function imports data into R as a tibble, while read.csv imports a regular old R data frame instead.

Tibbles are better than regular data frames because they:

  • load faster
  • don’t change input types
  • allow you to have columns as lists
  • allow non-standard variable names (i.e. your variables can start with a number and can contain spaces)
  • never create row names

Read more about tibbles here.

1 Like