[R] Transforming matrix

Liaw, Andy andy_liaw at merck.com
Thu Apr 10 16:19:18 CEST 2003


storage.mode(mat) <- "integer"

or

d <- dim(mat)
mat <- as.integer(mat)
dim(mat) <- d

HTH,
Andy

> -----Original Message-----
> From: Ramzi Feghali [mailto:ramzi_feg at yahoo.fr]
> Sent: Thursday, April 10, 2003 9:57 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Transforming matrix
> 
> 
> 
> hi everybody, 
> anyone knows how we can transform a binary matrix with TRUE 
> and FALSE to 0 and 1 without looping? 
> Thx 
> 
> 
> 
> ---------------------------------
> 
> 
> 	[[alternate HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

------------------------------------------------------------------------------



More information about the R-help mailing list