Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It MUST be the Rmarkdown file. The file you create will have a . rmd file extension located in the project directory you

It MUST be the Rmarkdown file. The file you create will have a ".rmd" file
extension located in the project directory you should have created as part of
starting a new project.
1. Create a new R markdown. Using comments, write your name, the date, and CSDA 5110
Homework 2 at the top of the script. Write your answers to the rest of these exercises in this
script and be sure to copy and paste the original questions using comments! Your script
should only contain valid R code and comments.
2. Which (if any) of the following variables names is/are invalid?
thisone <-1
THISONE <-2
1This <-3
this.one <-4
This.1<-5
ThIS.....ON...E <-6
This!On!e <-7
lkjasdfkjsdf <-8
3.2021 was a good year for the price of Gold your investment portfolio made $100,800 from investing in
gold. Create a variable called gold.in.2021 and assign the value of your investment portfolio to it.
4. During the last bank audit, we discovered that there was an error caused by a system calculation error
and $5000 per year wasnt added to your gold investment portfolio for the years 2018,2019, and 2020.
Create a new variable called calcError and assign it the amount miscalculated by the system. Create
another variable called corrected.total and add the variables gold.in.2021 and calcError to this new
variable. What is the new total amount?
5. Create a variable called numberVector1 and numberVector2. Using the c(), assign a vector of numbers,
1 through 15 to each vector. Use a different method of creating the vector for each variable. (Hint: this
was covered in your reading of chapter 4)Use the appropriate function to check the length of each of
the vector variables you created above
6. Using the two vector variables created above, add them together and assign the total to a variable
called totalVectors.
7. Use the appropriate function to sum the totalVectors variable to display the sum of the totalVectors
variable.
8. Joanne thinks that she completes more tasks when shes had a cup of coffee than when she doesnt.
To test this, she recorded how many tasks she completed over 7 days without drinking any coffee,
and then did the same over 7 days while drinking coffee. Her results are stored in a comma delimited
CSV file called Joannes Tasks
a. Import the comma delimited CSV file into R and assign the data to a variable called joanneTasks
b. Verify the variable holding the data is a data.frame variable
c. Using the appropriate function, write the code to verify that there are 7 rows and 4 columns in
the data frame.
9. Use the appropriate function that will display summary descriptive statistics about each column
within the data frame.
a. In your code, create comments about information you deduced from the summary descriptive
statistics.
10. Using the appropriate syntax write the code that allows you to access the column that contains the
Number of Tasks Completed Without Coffee data.
a. Use the appropriate function to display the mean value of that column.
b. Use the appropriate function to display the total of the values in the column.
11. Using the appropriate syntax write the code that allows you to access the column that contains the
Number of Tasks Completed With Coffee data.
a. Use the appropriate function to display the mean value of that column.
b. Use the appropriate function to display the total of the values in the column.
12. Using the appropriate syntax write the code that allows you to access the column that contains the
Total Daily Tasks data.
a. Use the appropriate function to display the mean value of that column.
b. Use the appropriate function to display the total of the values in the column.
13. Write a function that will display the question below and return the correct answer.
a. Was Joanne able to complete more tasks when she drank coffee or days when she did not drink
coffee?
Use Florida House Sale Data for the remaining questions.
14. Select two quantitative variables (from Taxes, Price, Size, and Lot)
a. Draw histogram for the two selected quantitative variables.
b. Draw the density plot for the two selected quantitative variables.
15. Select the categorical variable Quadrant.
a. Draw Pareto chart.
16. For both the quantitative variables used in question 14.
a. Determine the mean and median.
b. Compute the standard deviation of both variables.
c. Compute five number summary for both the variables.
d. Draw boxplotsUse the appropriate function that will display summary descriptive statistics about each column
within the data frame.
a. In your code, create comments about information you deduced from the summary descriptive
statistics. in R
Day of the WeekNumber of Tasks With CoffeeNumber of Tasks Without CoffeeTotal Tasks
Monday 81523
Tuesday 5510
Wednesday 8816
Thursday 6814
Friday 10818
Saturday 358
Sunday 5510

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago