Question: This project involves working with equations and assignment statements and with data structures. You will use RMarkdown and knit to generate output. You want to
This project involves working with equations and assignment statements and with data structures. You will use RMarkdown and knit to generate output. You want to include the questions with the results as well as the r code.
Write the r code that carries out the equations. Show the results from using the equations with the data given
Create a copy of the result array calling it new.result
Add to the element in the row column and matrix
Multiply every element in matrix by
Make a copy of vector calling it vectora
Change the third item in vectora to
Multiply the sixth item in vectora times the first item in vector and assign the result to a variable called vmult
Assume the following:
# Create the data frame.
emp.data data.frame empid c : empname cRick"Dan","Michelle","Ryan","Gary" salary c startdate asDatec stringsAsFactors FALSE
Create a data frame that is made up of the empid and the salary columns.
Do the same using numeric indexing instead of the column names.
Create a data frame that contains all rows where the salary is greater than with only one line of code.
Assume you have the data frame set up
Hint use indexing and relational operator where salary determines the rows selected
This is known as subsetting
Assume:
# Create the first data frame.
emp.data data.frame empid c : empname cRick"Dan","Michelle","Ryan","Gary" salary c startdate asDatec dept cIT"Operations","ITHR"Finance" stringsAsFactors FALSE
# Create the second data frame
emp.newdata data.frame empid c : empname cRasmi"Pranab","Tusar" salary c startdate asDatec dept cIT"Operations","Fianance" stringsAsFactors FALSE
# Bind the two data frames add rows
emp.finaldata rbindempdata,emp.newdata
Create a data frame that does not include the empname column.
Correct the error for the dept name of one of the employees.
Add a new column called role which indicates which employees are managers Rick Ryan, and Pranab and which are staff Dan Michelle, Gary, Rasmi, and Tusar
Deliverables
RMD file output
rmd file
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
