###################################################################
################# Module 4, Uploading data into R ################# 
###################################################################
## Lesson 7: Uploading Data:


###################################
##### WORKING DIRECTORY AND HOW IT WORKS
# When you interact with anything outside of R, you need to specify where
# those files are.


###################################
##### PREPARING DATA AS A SPREADSHEET BEFORE UPLOAD
# Next we'll talk about preparing your data before you upload it to R. I am going to
# be using Microsoft excel to show you what I mean, but I am not going to do anything
# that any other spreadsheet software including the free Google Sheets and OfficeLibre
# can't do.

# 1) enter the field data into a spreadsheet program (excel, google sheets)
# 2) preliminary data cleaning and save it as a .csv
# 3) uploading into R
# 4) secondary data cleaning and processing 


###################################
##### READING SPREADSHEETS INTO R
# And now the easy part!

read.csv(file = "data/island_veg_data_raw.csv", header=T)
my_data <- read.csv("data/island_veg_data_raw.csv")

head(my_data)


###################################
##### SUMMARY
# - What is the working directory and how does it work
# - How to prepare your data before uploading to R
# - How to read/upload your data into R

