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.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started