In R, please provide the code for the following: Install the ggpubr package. Load the islands data set; note that the units are in 10,000s of square miles (so a value of 14 indicates 14,000 square miles) Generate a qq plot, with a reference line, of the landmass in square miles of the islands (landmasses) in the data set. What can you conclude about the distribution of the sizes and which tests will and will not be appropriate for this data set? Use the sample function to create 5 different samples of size 15 from the islands data set. You will use these samples for the remainder of the lab. Plot boxplots of all 5 data sets on the same graph, with each boxplot being a different color. Clearly label your sets 1-5, and use this same ordering to present your results in the rest of this problem. Make a dataframe with one column that has the sample number (1-5) and another column with the data. Make sure you have named your columns. An example where sample1 is the first sample of 15 points etc is given here: sampleIndices <- c(rep(1,15), rep(2,15), rep(3,15), rep(4,15), rep(5,15)) allSampleData <- c(sample1, sample2, sample3, sample4, sample5) my_data <- data.frame(sampleIndices, allSampleData) colnames(my_data) <- c("sample number", "sq ft") Use the ggboxplot function from the ggpubr library to create your plot
In R, please provide the code for the following:
Install the ggpubr package.
Load the islands data set; note that the units are in 10,000s of square miles (so a value of 14 indicates 14,000 square miles)
Generate a qq plot, with a reference line, of the landmass in square miles of the islands (landmasses) in the data set. What can you conclude about the distribution of the sizes and which tests will and will not be appropriate for this data set?
Use the sample function to create 5 different samples of size 15 from the islands data set. You will use these samples for the remainder of the lab.
Plot boxplots of all 5 data sets on the same graph, with each boxplot being a different color. Clearly label your sets 1-5, and use this same ordering to present your results in the rest of this problem.
Make a dataframe with one column that has the sample number (1-5) and another column with the data. Make sure you have named your columns. An example where sample1 is the first sample of 15 points etc is given here: sampleIndices <- c(rep(1,15), rep(2,15), rep(3,15), rep(4,15), rep(5,15)) allSampleData <- c(sample1, sample2, sample3, sample4, sample5)
my_data <- data.frame(sampleIndices, allSampleData)
colnames(my_data) <- c("sample number", "sq ft")
Use the ggboxplot function from the ggpubr library to create your plot
Trending now
This is a popular solution!
Step by step
Solved in 3 steps