11.2 Reload data
Reload data; be sure to include the “csv” at the end. Use this code “eaglesPA <- read.csv(file =”eaglesPA.xlsx“)”. NOTE: I changed the name of the file to include “_w_2_states" so that I wouldn’t overwrite the original file. Don’t use this code unless you changed the file name to the exact same thing
#Use this code, w/o the "#" in front of it
# eaglesPA <- read.csv(file = "eaglesPA.xlsx")
#NOTE: I changed the name of the file to include "_w_2_states" so that I wouldn't overwrite the origina file. Don't use this code unless you changed the file name to the exact smame thing
#eaglesPA <- read.csv(file = "./data/Lab1_data_PA_eaglesPA_w_2_states.csv")
Type ls() to see what is now in your workspace
ls()
## [1] "crabs" "eagle.df" "eagles" "eaglesWV.url"
## [5] "eaglesWV.url_2" "eaglesWV_2" "iris" "med98"
## [9] "msleep" "my.abc" "my.mean" "x"
## [13] "year"
Look at the re-loaded eaglesPA data object
summary(eaglesPA)
dim(eaglesPA)
head(eaglesPA)
tail(eaglesPA)
In this section we’ll focus on basic plotting skills. The first chapter in this section is a review of the skills needed to get some data into R from a package. Subsequent chapters will develop plotting skills with a focus on using ggplot2.
We’ll briefly go over all aspects of ggplot2 and its varients. This will orient you to the different things you are likely to see other R users use. For most of this book, however, we’ll focus on a package which creates a “wrapper” for ggplot2 called ggpubr which speeds up the process for beginners of making publication-ready graphs. Even if you are a ggplot2 pro you should know about ggpubr for making quick graphs, and for teaching others about ggplot2.