[R] Behaviors of diag() with character vector in R 3.0.0

2013-04-09 Thread Mike Cheung
Dear all, According to CHANGES IN R 3.0.0: o diag() as used to generate a diagonal matrix has been re-written in C for speed and less memory usage. It now forces the result to be numeric in the case diag(x) since it is said to have 'zero off-diagonal entries'. diag(x) does

Re: [R] Behaviors of diag() with character vector in R 3.0.0

2013-04-09 Thread arun
#[5,] 0  0  0  0  e A.K. - Original Message - From: Mike Cheung mikewlche...@gmail.com To: r-help r-help@r-project.org Cc: Sent: Tuesday, April 9, 2013 3:15 AM Subject: [R] Behaviors of diag() with character vector in R 3.0.0 Dear all, According to CHANGES IN R 3.0.0: o diag() as used

Re: [R] Behaviors of diag() with character vector in R 3.0.0

2013-04-09 Thread R. Michael Weylandt
On Tue, Apr 9, 2013 at 7:15 AM, Mike Cheung mikewlche...@gmail.com wrote: Dear all, According to CHANGES IN R 3.0.0: o diag() as used to generate a diagonal matrix has been re-written in C for speed and less memory usage. It now forces the result to be numeric in the case

Re: [R] Behaviors of diag() with character vector in R 3.0.0

2013-04-09 Thread Mike Cheung
0 0 #[2,] 0 b 0 0 0 #[3,] 0 0 c 0 0 #[4,] 0 0 0 d 0 #[5,] 0 0 0 0 e A.K. - Original Message - From: Mike Cheung mikewlche...@gmail.com To: r-help r-help@r-project.org Cc: Sent: Tuesday, April 9, 2013 3:15 AM Subject: [R] Behaviors of diag() with character