Reading data

The formats and structures in which data comes can be varied. However, thanks to its contributive feature and extensibility, there is a package to load data into R for almost every data structure (at least the standard ones). In order to do this, it is always necessary to use functions that have different argument types according to their nature.

Delimited data

All the delimited formats in R use the same base function, that is, read.table(). This function uses many arguments but most of them have a default value. The following is a list of the most important ones:

  • header: If it is set to T, the first row is used to assign the names of the data frame.
  • nrows: This gives the amount of rows to be read. If it is set to -1, all rows are read. ...

Get Learning Shiny now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.