[R] Create Arrays
dpender
d.pender at civil.gla.ac.uk
Fri Oct 15 10:55:02 CEST 2010
Hi,
For this example:
O <- c(0 0 0 2 0 0 2 0)
I want to create an array every time O[i] > 0. The array should be in the
form;
R[j] <- array(-1, dim=c(2,O[i]))
i.e. if O[i] > 0 4 times I want 4 R arrays.
Does anyone have any suggestions?
Thanks,
Doug
--
View this message in context: http://r.789695.n4.nabble.com/Create-Arrays-tp2996706p2996706.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list