1. How do you install a package in R environment? Write the R command as an example. You may use any package of your choice to demonstrate the installation of a package.
2. How do you call a package within your current R session? You may use any installed package of your choice to demonstrate this.
3. How do you load data from an excel file (with xlsx or csv extension) in R environment? Demonstrate by using any excel file on your local computer and loading it into the R environment.
4. Plot a scatter plot with numerical or quantitative variable on the y-axis and categorical or qualitative variable on the x-axis. You may use any dataset within the R environment. You must use the ggplot function from the ggplot2 package. Why such a plot with categorical variable on the x-axis and quantitative variable on the y-axis are not very useful. Which plot is used to plot categorical variable on the x-axis and numerical variable on the y-axis?
5. Now plot a scatter plot with numerical or quantitative variable on both the x-axis as well as the y-axis. You may use any dataset within the R environment. You must use the ggplot function from the ggplot2 package.
6. Plot a simple line graph using any dataset available within the R environment. You must use the ggplot function from the ggplot2 package.
7. Which plot is used to plot a bell curve or normal curve? Plot a bell curve or normal curve using any dataset present within the R environment. You must use the ggplot function from the ggplot2 package. 8. Write the R code to create the following boxplot for the mpg dataset. This dataset is available within the R environment:
Now interpret the above box plot as to what insights can be drawn from it.
9. Write the R code to create the following bar plot for the mtcars dataset. This dataset is available within the R environment:
10. Write the R code to create the following grouped bar plot for the mpg dataset. This dataset is available within the R environment:
Why there’s no multiple bars for cylinder = 5 in the above bar plot?
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.