Question: Can you please help me create commands for the following within R Studio? To load the Psych package: install.packages(psych) followed by library(psych). In Excel, delete

Can you please help me create commands for the following within R Studio?

To load the "Psych" package: install.packages("psych") followed by library("psych").

  1. In Excel, delete the first row in the "SalesData" sheet in the "Red Bluff Golf Course Data" file. Convert all dollar fields to "number" fields with two places past the decimal. Retain the "SalesData" sheet and remove the rest of the sheets from the file. Save the file as a *.csv file and name it: "Red Bluff Golf Course Data.csv" file.
  2. Read the "Red Bluff Golf Course Data.csv" file into R as a data frame. Name the data frame SalesDataset.
  3. Using an appropriate command from the "Psych" package, summarize the SalesDataset data frame.
  4. From the SalesDataset copy "QuantitySold" to a vector called "Quantity." Copy "TotalSales" to a vector called "Sales." Copy "TotalCosts" to a vector called "Costs."
  5. Create a boxplot for "Quantity." Ensure that the boxplot color is gold.
  6. Create a histogram for "Quantity." Ensure that the counts are on the y axis.
  7. Create a scatterplot for "Quantity and Sales." Ensure that "Quantity" is the x variable and "Sales" is the y variable.
  8. Create a scatterplot for "Quantity and Costs." Ensure that "Quantity" is the x variable and "Costs" is the y variable.
  9. Run simple linear regression analyses for "Quantity and Sales." Ensure that "Quantity" is the x variable and "Sales" is the y variable. Summarize the regression results using an appropriate R command.

10. Run simple linear regression analyses for "Quantity and Costs." Ensure that "Quantity" is the x variable and "Costs" is the y variable. Summarize the regression results using an appropriate R command

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 Finance Questions!