Question: Access R Studio. Then, demonstrate how to work with each data structure as outlined below. Take appropriate screenshots (with descriptions) as needed. All documentation should

Access R Studio. Then, demonstrate how to work with each data structure as outlined below. Take appropriate screenshots (with descriptions) as needed. All documentation should be completed with the necessary markdown documents.

Vectors

Create a vector as a sequence of number 1-15.

Create a vector as a sequence of numbers 1-15 that increment by 0.1.

Demonstrate how missing data is represented as NA in vectors (use the na() and anyNA() functions).

Utilize the conversion between modes "coercion" in R to perform an "implicit coercion" on the following: a) xx p(2.5, "g"), b) xx p(TRUE, 4) and c) xx p("g", TRUE).

Control how vectors are coerced explicitly using the as.() functions (numeric and character).

Matrices

Create a column-wise 5 x 8 matrix.

Check that the matrices are vectors with a class attribute of matrix by using class() and tyepof().

Create a matrix by transforming a 5 x 8 vector into a matrix.

Arrays

Create an array of movies that contains the Top 10 movies of 2020.

Lists

Construct a list of 10 cars (make, model, year, mpg).

Data Frames

Create a data frame of all 26 letters of the alphabet with the following information (id = letters[1:26], x = 1:26, y = 27:52).

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