search for: 2b45

Displaying 1 result from an estimated 1 matches for "2b45".

Did you mean: 2345
2011 Sep 27
2
Matrix and list indices
Hi guys, I am trying to replace all elements of earth that are equal to zero with their corresponding elements in mars. I can do the replace with a bunch of for-loops, but I don't think this is the R way of doing things. my_list <- list( earth=array(c(0,0,45,0,0,45,0,45),dim=c(2,2,2)), mars=array(c(8:1),dim=c(2,2,2))) my_list for (i in c(1:2)) { for (j in c(1:2)) {