Question: To complete this assignment, you must create an R script file that includes the code required to complete the following steps: 1. Print your name
To complete this assignment, you must create an R script file that includes the code required to complete the following steps: 1. Print your name (Dale) at the top of the script and load these libraries: FSA, FSAdata, magrittr, dplyr, tidyr plyr and tidyverse 2. Import the inchBio.csv and name the table 3. Display the head, tail and structure of 4. Create an object , that counts and lists all the species records 5. Display just the 8 levels (names) of the species 6. Create a object that displays the different species and the number of record of each species in the dataset. Include this information in your report.- 7. Create a subset, , of just the species variable and display the first five records 8. Create a table, , of the species variable. Display the class of w 9. Convert to a data frame named and display the results 10. Extract and display the frequency values from the data frame 11. Create a table named from the bio species attribute (variable) and confirm that you created a table which displays the number of species in the dataset 12. Create a table named that displays the species and percentage of records for each species. Confirm you created a table class.
13. Convert the table, , to a data frame named and confirm that is a data frame 14. Create a barplot of with the following: titled Fish Count with the following specifications: Title: Fish Count Y axis is labeled COUNTS Y axis limits of 0 to 250 Color the bars Light Blue Rotate X axis label to be vertical Set the X axis font magnification to 60% of nominal 15. Create a barplot of , with the following specifications: Y axis limits of 0 to 0.4 Color the bars Light Green Title of Fish Relative Frequency 16. Rearrange the cSpec Pct data frame in descending order of relative frequency. Save the rearranged data frame as the object 17. Rename the columns Var 1 to Species, and Freq to RelFreq 18. Add new variables to and call them cumfreq, counts, and cumcounts 19. Create a parameter variable to store parameter variables 20. Create a barplot, , with the following specifications: d$counts of width 1, spacing of .15 no boarder Axes: F Y axis limit: 0, 3.05*max d$counts na.rm is true y label is Cumulative Counts scale x axis to 70% names.arg: d$Species
Title of the barplot is Species Pareto las: 2 21. Add a cumulative counts line to the plot with the following: Spec line type is b Scale plotting text at 70% Data values are solid circles with color cyan4 22. Place a grey box around the pareto plot (hint: https://www.statmethods.net/advgraphs/parameters.html) 23. Add a left side axis with the following specifications Horizontal values at tick marks at cumcounts on side 2 Tickmark color of grey62 Color of axis is grey62 Axis scaled to 80% of normal (hint: https://www.statmethods.net/advgraphs/axes.html) 24. Add axis details on right side of box with the specifications: Spec: Side 4 Tickmarks at cumcounts with labels from 0 to cumfreq with %, Axis color of cyan5 and label color of cyan4 Axis font scaled to 80% of nominal 25. Display the finished Species Pareto Plot (without the star watermarks). Have your last name (Stephen) on the plot