Solution Review: Arrays and Matrices
In this review, we give a detailed analysis of the solution to this problem.
Solution #1: Using vectors
Press + to interact
R
myVector1 <- c ('a', 'b', 'c')myVector2 <- c ('d', 'e', 'f')myVector3 <- c ('g', 'h', 'i')myArray <- array (c(myVector1, myVector2, myVector3), dim = c(3, 3, 1))cat(myArray)
...