R Basics-4 - Coding-Vectors and Matrices (Hands On) - ClassiCoder

Vectors and Matrices

Perform the following tasks:

1. Create a vector V with values 1 to 9
2. Create a 3X3 matrix M using the vector V (Set parameter byrow = TRUE)
3. Multiply all the elements in the matrix by 2
4. Print the result matrix

VECTORS-AND-MATRICES-R-Basic

VECTORS-AND-MATRICES-R-Basic-Solution