On Tue, 2011-08-16 at 12:10 -0500, Stuart Luppescu wrote: > but when I use the ifelse() as above, I get this: > [,1] [,2] [,3] [,4] > [1,] 0.04166667 0.04166667 0.04166667 0.04166667 > [2,] 0.00000000 0.00000000 0.00000000 0.00000000
Oh, I see. ifelse() returns a value of the same length as the test argument. -- Stuart Luppescu -=- slu .at. ccsr.uchicago.edu University of Chicago -=- CCSR 才文と智奈美の父 -=- Kernel 2.6.39-gentoo-r3 This reminds me of a famous FORTRAN code snippet: 10 STOP STOP STOP ! IN CASE STILL SKIDDING GOTO 10 -- Carl Witthoft (in response to the question how to completely stop R scripts after stop()) R-help (January 2011) ______________________________________________ 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.