Section 9 Read, Write and Save Data

9.1 A quick look

  • Work with the data
    • Download the Microsoft Excel data file: iris.xlsx
    • Open the file in Microsoft Excel
    • Change the first record of Sepal.Length = 4.1
    • Save the data as a comma-separated csv file: “irisMod.csv”.
    • Go to Rstudio, read the csv file “irisMod.csv”
    • Check that R read the data with the edited record, i.e. the first record of Sepal.Length = 4.1
    • Change the first record of Sepal.Length to the correct value, i.e. Sepal.Length = 5.1
    • Save the data as a csv file: “iris.csv”
    • Also save the data as an R data object: “iris.RData”