Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. C <- matrix(1:3)
  2. W <- matrix(2:4)
  3. S <- matrix(3:5)
  4.  
  5. > K
  6. [,1] [,2] [,3]
  7. [1,] C 0 0
  8. [2,] 0 W S
  9.  
  10. > C <- matrix(0, 3,2)
  11. > W <- matrix(1, 4,5)
  12. > S <- matrix(2, 6,7)
  13. > bigM <- matrix( list(), 2, 3)
  14. > bigM[1,1] <- list(C)
  15. > bigM[2,2] <- list(W)
  16. > bigM[2,3] <- list(S)
  17. > bigM
  18. [,1] [,2] [,3]
  19. [1,] Numeric,6 NULL NULL
  20. [2,] NULL Numeric,20 Numeric,42
  21. > bigM[2,3][[1]][42]
  22. [1] 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement