Question
1. Print your name at the top of the script. Include the prefix: Plotting Basics: 2. Import libraries including: plyr, FSA, FSAdata, magrittr, dplyr, plotrix,
1. Print your name at the top of the script. Include the prefix: Plotting Basics: 2. Import libraries including: plyr, FSA, FSAdata, magrittr, dplyr, plotrix, ggplot2, and moments 3. Load the BullTroutRML2 dataset 4. Print the first and last 3 records from the dataset 5. Filter out all records except those from Harrison Lake 6. Display the first and last 3 records from the filtered dataset 7. Display the structure of the filtered dataset 8. Display the summary of the filtered dataset and save it as
X axis label is Age (yrs) Title of the histogram is Plot 2: Harrison Fish Age Distribution The color of the frequency plots is cadetblue The color of the Title is cadetblue 11. Create an overdense plot using the same specifications as the previous scatterplot. But, include two levels of shading for the black data points. Title the plot Plot 3: Harrison Density Shaded by Era 12. Create a new object called tmp that includes the first 3 and last 3 records of the whole data set. 13. Display the era column in the new tmp object 14. Create a pchs vector with the argument values for + and x. Then create a cols vector with the two elements red and gray60 15. Convert the tmp object values to numeric values. Then create a numeric numEra object from the tmp$era object 16. Associate the cols vector with the tmp era values 17. Create a plot of Age (yrs) (y variable) versus Fork Length (mm) (x variable) with the following specifications: Limit of x axis is (0,500) Limit of y axis is (0,15) Title of graph is Plot 4: Symbol & Color by Era X axis label is Age (yrs) Y axis label is Fork Length (mm) Set pch equal to pchs era values Set col equal to cols era values 18. Plot a regression line of the previous plot with a dashed line with width 2 and color cadetblue 19. Place a legend of levels by era with pchs symbols in the top left of the plot with the following specifications: Inset of 0.05 No box around the legend Font size: 75% of nominal
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started