Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 9. Create a scatterplot for age (y variable) and fl (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 1: Harrison Lake Trout X axis label is Age (yrs) Y axis label is Fork Length (mm) Use a small filled circle for the plotted data points 10. Plot an Age histogram with the following specifications Y axis label is Frequency

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Explain the strength of acid and alkali solutions with examples

Answered: 1 week ago

Question

Introduce and define metals and nonmetals and explain with examples

Answered: 1 week ago

Question

What color should you use to show favorable metrics?

Answered: 1 week ago

Question

Which job has negative profit?

Answered: 1 week ago