Ad Code

Ticker

6/recent/ticker-posts

TCS Ievolve competncy ID - 5337 - Data Science Fresco Play Hands on - R basics - Vectors and Matrices

                                        

TCS Ievolve competncy ID - 5337 - Data Science

E0- Fresco Play Hands on - R basics - 3 Vectors and Matrices

Ievolve course ID - 55101


question - 

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

Answer -

v = 1:9
m = matrix(v,nrow=3,byrow=TRUE)
Mm*2
M

Post a Comment

0 Comments