Hello my R buddies, I'm trying to generate a bivariate data.frame with the elements of first row greater than the second row. The more complicated method that I can think of is:
n <- 10 temp <- expand.grid(1:n,1:n) temp<-temp[temp[,1]>temp[,2],] However, I guess there must be some easier way of doing this. Besides, if inequality condition is applied at the very beginning, this will save me a lot of memory if n goes to a very large number. Is there any suggestions? Thanks a lot. Best wishes, -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.