Chapter 11 Loading Excel spreadsheets into RStudio

Nathan Brouwer, Phd brouwern at gmail.com https://github.com/brouwern Twitter: lobrowR

THIS CHAPTER HAS NOT BEEN WRITTEN

re-save as .csv and load

load directly

In this walk through we first re-save this data in an R-compatible format, a “csv” file, called “Lab1_data_PA_eagles.csv”.

11.0.1 Prepping data in Excel

11.0.1.1 Save data to your R working directory (WD)

Find the file https://github.com/brouwern/wildlifeR/tree/master/inst/extdata

Save the file “Lab1_data_PA_eagles.xlsx” to your computers desktop. Today we will be using this as the “working directory”

11.0.1.2 Re-Save The Excel file as a “csv” file

In Excel, follow these steps

  • “File”
  • “Save As”
  • “Browse”
  • Select the working directory (your desktop)
  • Select “Save as type”
  • Select “CSV (Comma delimited)”
  • Click “Save”

The data is now in a format that can be loaded into R.