[R] as.matrix and one row

2006-03-28 Thread Federico Calboli
Hi All, I have the following problem: x = c(1,2) x [1] 1 2 as.matrix(x) [,1] [1,]1 [2,]2 BUT, if I add: y = c(3,4) as.matrix(rbind(x,y)) [,1] [,2] x12 y34 It does not transpose. Since I will need as.matrix() for a list of data that is in one or more lines, I

Re: [R] as.matrix and one row

2006-03-28 Thread Uwe Ligges
Federico Calboli wrote: Hi All, I have the following problem: x = c(1,2) x [1] 1 2 as.matrix(x) [,1] [1,]1 [2,]2 BUT, if I add: y = c(3,4) as.matrix(rbind(x,y)) [,1] [,2] x12 y34 It does not transpose. Since I will need as.matrix() for

Re: [R] as.matrix and one row

2006-03-28 Thread Peter Dalgaard
Federico Calboli [EMAIL PROTECTED] writes: Hi All, I have the following problem: x = c(1,2) x [1] 1 2 as.matrix(x) [,1] [1,]1 [2,]2 BUT, if I add: y = c(3,4) as.matrix(rbind(x,y)) [,1] [,2] x12 y34 It does not transpose. Since I will