fork download
  1.  
  2.  
  3. obj_A <- list(matrix(NA,nrow = 2,2), matrix(NA,nrow = 3,2),matrix(NA,nrow = 2,1));
  4. ## 物件結構 list中的各個矩陣維度有可能也是不一樣
  5.  
  6. ## 想填入的值
  7. num <- c(1:12)
  8.  
  9. ## 希望結果是
  10. res_A <- list(matrix(1:4,nrow = 2,2), matrix(5:10,nrow = 3,2),matrix(1:2,nrow = 2,1));
  11.  
Success #stdin #stdout 0.19s 175424KB
stdin
Standard input is empty
stdout
Standard output is empty