Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C <- matrix(1:3)
- W <- matrix(2:4)
- S <- matrix(3:5)
- > K
- [,1] [,2] [,3]
- [1,] C 0 0
- [2,] 0 W S
- > C <- matrix(0, 3,2)
- > W <- matrix(1, 4,5)
- > S <- matrix(2, 6,7)
- > bigM <- matrix( list(), 2, 3)
- > bigM[1,1] <- list(C)
- > bigM[2,2] <- list(W)
- > bigM[2,3] <- list(S)
- > bigM
- [,1] [,2] [,3]
- [1,] Numeric,6 NULL NULL
- [2,] NULL Numeric,20 Numeric,42
- > bigM[2,3][[1]][42]
- [1] 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement