Session Ready
Exercise

read.csv

The utils package, which is automatically loaded in your R session on startup, can import flat files in different forms. read.csv() and read.delim() are wrappers around read.table() to make your life easier.

In this exercise, you'll be working with swimming_pools.csv; it contains data on swimming pools in Brisbane, Australia (Source: data.gov.au). The file contains the variable names in the first row. It uses a comma to separate values within rows. swimming_pools.csv is already available in your working directory; type dir() in the console to list the files in your working directory.

Instructions
100 XP
  • Use read.csv() to import "swimming_pools.csv" as a data frame with the name pools. Don't forget to pass the filename in quotes!
  • Print the structure of pools using str().