Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: Write an R script and an R markdown that perform the following operations in the order listed. - - At the beginning of each

Instructions:
Write an R script and an R markdown that perform the following operations in the order listed.
-- At the beginning of each task, write a comment marking the task number. For example
# Task 1
- In the markdown file, include the code for each task in one block.
- Name the files as: lab1-.R and lab1-.Rmd (for markdown)
- After you complete the markdown file, using the knit function to create the HTRM report that contains both the code and the output
Tasks:
1. Learning RStudio environment: examine the 4 panes: source editor, console, workspace browser(objects/variables), and plots. Make sure you understand the purpose and content of each pane. (No script needed for this task)
2. Set the working directory to your Lab1 folder. (No script needed for this task)
3. Create 4 vectors: studentID, firstName, lastName, passFail. Each vector should contain appropriate type of data and at least 5 data elements. Print each vector, check the type and structure of each vector.
4. Create a data frame named studentTable using the 4 vectors that you created in task 3. Print the data frame and check the structure of the data frame.
5. Create 2 matrices. Each matrix should contain at least 20 data elements and at least 3 rows and 3 columns. The two matrices should contain different types of data. Print each matrix. Check the type and structure of each matrix.
6. Create 2 arrays. Each array should contain at least 20 data elements and at least 3 tables. The two arrays should contain different types of data. Print each array. Check the type and structure of each matrix.
7. Create 1 list. The list should have at least 4 vectors. Each vector should have at least 3 data elements. The vectors should have different length and contain at least 2 different types of data. Print the list and check the structure of the list.
8. Create another list containing the list you create in task 7. Print the list.

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

Healthcare And Medical Office Accounting

Authors: Wayne A. Label, Weldon E. Havins

2nd Edition

0986099805, 978-0986099809

Students also viewed these Databases questions

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago

Question

What is the best conclusion for Xbar Chart? UCL A X B C B A LCL

Answered: 1 week ago