Re: [R] Error during wrapup: incorrect number of dimensions

2012-03-26 Thread Peter Ehlers
On 2012-03-26 12:57, Sam Steingold wrote: when subsetting a matrix results in a single row, it is converted to a vector, not a matrix. how do I avoid this? Check ?"[" and note the 'drop=' argument. Peter Ehlers 1. __GOOD__ edges<- get.edges(g,E(g)) edges [,1] [,2] [1,]02

Re: [R] Error during wrapup: incorrect number of dimensions

2012-03-26 Thread Berend Hasselman
On 26-03-2012, at 21:57, Sam Steingold wrote: > when subsetting a matrix results in a single row, it is converted to a > vector, not a matrix. > how do I avoid this? > > 1. __GOOD__ > >> edges <- get.edges(g,E(g)) >> edges > [,1] [,2] > [1,]02 > [2,]03 > [3,]04 > [4

[R] Error during wrapup: incorrect number of dimensions

2012-03-26 Thread Sam Steingold
when subsetting a matrix results in a single row, it is converted to a vector, not a matrix. how do I avoid this? 1. __GOOD__ > edges <- get.edges(g,E(g)) > edges [,1] [,2] [1,]02 [2,]03 [3,]04 [4,]05 [5,]11 [6,]04 [7,]06 [8,]