Question: Using Rstudio, generate the associated R outputs using these R commands: 1 . install.packages ( psych ) 2 . install.packages ( ggplot

Using Rstudio, generate the associated R outputs using these R commands:
1. install.packages("psych")
2. install.packages("ggplot2")
3. library(readxl)
SalesDataset <- read_excel("SalesDataset.xlsx")
4. library(psych)
describe(SalesDataset)
5. library(ggplot2)
ggplot(SalesDataset, aes(x=SaleType, y=QuantitySold, fill=SaleType))+
geom_boxplot()+
labs(title="Boxplot of QuantitySold by SaleType", x="SaleType", y="QuantitySold")+
Theme(plot.title = element_text(hjust =0.5))
6. ggplot(SalesDataset, aes(x=QuantitySold))+
geom_histogram(color="purple", fill="yellow")+
labs(title="Histogram of QuantitySold", x="QuantitySold", y="Count")+
theme(plot.title = element_text(hjust =0.5))
7. ggplot(SalesDataset, aes(x=QuantitySold, y=TotalSales, color=SaleType))+
geom_point()+
labs(title="Scatterplot of Quantity and Sales", x="QuantitySold", y="TotalSales")+
theme(plot.title = element_text(hjust =0.5))
8. ggplot(SalesDataset, aes(x=QuantitySold, y=TotalCosts, color=SalesRep))+
geom_point()+
labs(title="Scatterplot of Quantity and Costs", x="QuantitySold", y="TotalCosts")+
theme(plot.title = element_text(hjust =0.5))
9. model1<- lm(TotalSales ~ QuantitySold, data=SalesDataset)
summary(model1)
10. model2<- lm(TotalCosts ~ QuantitySold, data=SalesDataset)
summary(model2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!