For all the coding tasks below, create a single R Script and save it with the file name format {familyname_firstname.R}. Make sure to submit the file on or before the deadline.
The data in Table 1 below shows the crime rate in the Philippines from 1981 to 1999.
crime<-data.frame(
Year=c(1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999),
Rate =c(159.9, 168.1,178.7,186.2,184.5,152.1,144.6,155.8,157.8,143.4,121.7,103.7,88.4,80.9,63.3,56.3,54.2,51.3,50.2))Using the data in Table 1 above,
The abalone dataset comes from original study:
Warwick J Nash, Tracy L Sellers, Simon R Talbot, Andrew J Cawthorn and Wes B Ford (1994) “The Population Biology of Abalone (Haliotis species) in Tasmania. I. Blacklip Abalone (H. rubra) from the North Coast and Islands of Bass Strait”,Sea Fisheries Division, Technical Report No. 48 (ISSN 1034-3288)
Import the abolone dataset from https://archive.ics.uci.edu/ml/machine-learning-databases/abalone/abalone.data
Using the data above, do the following:
Create a scatterplot between the length and the diameter measurements.
Add a regression line to the plot.
Generate a scatterplot matrix for the following variables: length, diameter, rings, Shell weight.
Color the points of the scatter plot based on the sex/gender of abalone.
Optional[Add the correlation value in the lower panel of the scatter plot matrix]
Generate the descriptive statistics such as mean, median, standard deviation, and interquartile range for the following variables: Length, Diameter, Height, Whole Weight, Shucked Weight, Visc Weight, Shell Weight, Rings.
Calculate by Gender the descriptive statistics (mean, median, standard deviation and IQR) for the following variables: Length, Diameter, Height, Whole Weight, Shucked Weight, Visc Weight, Shell Weight, Rings.