[R] Numeric, 2 ??? as a result of marix???

2009-08-29 Thread Wolfgang Polasek
Strange things are going on in R, if you reshape a matrix in R: g=gretldata[1:2,] g Empfang Versand Transit Inland AuslandSumS 1 787844.0 1307176.6 223395.4 1474726 16199.1 3809341 2 421473.1 306445.4 448801.2 1779402 14445.6 2970567 dim(g) [1] 2 6 as.vector(g) Empfang Versand

Re: [R] Numeric, 2 ??? as a result of marix???

2009-08-29 Thread Duncan Murdoch
Wolfgang Polasek wrote: Strange things are going on in R, if you reshape a matrix in R: g=gretldata[1:2,] g Empfang Versand Transit Inland AuslandSumS 1 787844.0 1307176.6 223395.4 1474726 16199.1 3809341 2 421473.1 306445.4 448801.2 1779402 14445.6 2970567 dim(g)

Re: [R] Numeric, 2 ??? as a result of marix???

2009-08-29 Thread Stefan Grosse
On Sat, 29 Aug 2009 00:15:45 +0200 Wolfgang Polasek wolfgang.pola...@gmail.com wrote: WP g=gretldata[1:2,] WP g WPEmpfang Versand Transit Inland AuslandSumS WP 1 787844.0 1307176.6 223395.4 1474726 16199.1 3809341 WP 2 421473.1 306445.4 448801.2 1779402 14445.6 2970567 WP dim(g)

Re: [R] Numeric, 2 ??? as a result of marix???

2009-08-29 Thread Gabor Grothendieck
g does not appear to be a matrix, as described. Its more likely a data frame. If that is the case then as.matrix(g) will create a matrix from it. Also depending on what you want to do ?unlist, ?t or ?c may be of help. Also try str(g) and dput(g) to see internals of object as they seem not to

Re: [R] Numeric, 2 ??? as a result of marix???

2009-08-29 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Wolfgang Polasek Sent: Friday, August 28, 2009 3:16 PM To: r-help@r-project.org Subject: [R] Numeric, 2 ??? as a result of marix??? Strange things are going on in R, if you