[R] trheshold matrix

Alaios alaios at yahoo.com
Fri Jun 3 10:09:29 CEST 2011


Dear all I want to put zeros and ones in matrix I have if the values are over a threshold

For that I use:

origBoolmap<- (origmap >thresh )
origBoolmap[thresh < origmap] <- 1
origBoolmap[thresh >= origmap] <- 0

Could you please tell me if the first line out of the three is useless? I have checked and seems taht I take the same results.

Best Regards
Alex



More information about the R-help mailing list