Skip to content
Back to formatted view

Raw Message

Message-ID: <3E957E07.2010005@pdf.com>
Date: 2003-04-10T14:21:59Z
From: Spencer Graves
Subject: Transforming matrix

> A <- array(c(T,F,F,T), dim=c(2,2))
 > A+0
      [,1] [,2]
[1,]    1    0
[2,]    0    1

How's this?
Spencer Graves

Ramzi Feghali wrote:
> 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