Section 11 Read and Save Data

11.1 A quick look

  • Work with the data
    • Download the Microsoft Excel data file: weather.xlsx
    • Open the file in Excel
    • Change the temp value of the first row as 13.7
    • Save the data as a comma-separated csv file: “mod_weather.csv”.
    • Go to Rstudio, set the working directory to the folder where the csv file is saved
    • Read the csv file “mod_weather.csv” and assigned it to a R data.frame object weather.
    • Check that the data read with incorrect temp value for the first record
    • Change the first record of temp to the correct value, i.e. temp = 3.7
    • Save the data as a csv file: “weather.csv”
    • Save the data as an R data object: “weather.RData”