Project 1 – The Layered Grammar of Graphics and Package “ggplot2” Step 1: Execute the following commands in the RStudio console: > library(ggplot2) > data(package = “ggplot2”) This returns a list of...

1 answer below »
question is in attachment. I need help with R coding


Project 1 – The Layered Grammar of Graphics and Package “ggplot2” Step 1: Execute the following commands in the RStudio console: > library(ggplot2) > data(package = “ggplot2”) This returns a list of datasets that reside in the ggplot2 package. Step 2: Select a dataset from the list, and study the data: Number of variables and observations Variable names and definitions You can google on “package ggplot2” or “datasets contained in ggplot2” for more information Step 3: Explore your data by plotting various combinations of data in various ways. Create new variables with mutate() if necessary. Run any kind of statistics you see fit. Run regressions using function lm(). Step 4: Select the most interesting graphics that you generated during your exploration (minimum of 4), and write a summary interpretation of your findings using Microsoft Word. Use the snipping tool in Windows to create png files of your graphs and insert them into your Word document. 2
Answered 2 days AfterFeb 04, 2021

Answer To: Project 1 – The Layered Grammar of Graphics and Package “ggplot2” Step 1: Execute the following...

Suraj answered on Feb 06 2021
157 Votes
Assignment
Topic: The Layered Grammar of Graphics and Package “ggplot2”
Submitted To:
Submitted By:

Date: 06/02/2021
Step 1:
In this step we will load the “ggplot2” library and see different types of datasets available in this library. The following is the required code for it:
library(ggplot2)
data(package="ggplot2")
df<-mpg
Hence, from the various datasets available in the library.
Step 2:
In this step we load the mpg dataset from the ggplot2 library.
The following code will give total number of variables and total observations:
nrow(mpg)
ncol(mpg)
the output is: there are total 11 columns and 234 observations. Thus, there are total 11 different kinds of variables.
The variables names and their definitions are given as follows:
The manufacturer variable is the name of car manufacturer and there are total 15 manufactures data in the dataset.
The model variable describes the model of the car. There are total 38 models of cars.
The displ is the engine displacement in liters.
The year...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here