Question: Question Use the following R script to create a vector 'x'. set.seed(100) x
Question
Use the following R script to create a vector 'x'.
set.seed(100)
x <- round(rnorm (18, mean = 2, sd = 0.1), 2)
Create a 3 x 6 matrix (matrix with 3 rows and 6 columns) using x, and assign the name 'x.mat' to the matrix
R script - Use the " : " operator and arithmetic operators in Chapter 1 to create the following vectors. You have to use " : " operator on p. 7 in Chapter 1 course material for both a) and b).
a) [1] 5 10 15 20 25 30
b) [1] 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
