[R] Question about Structure

Partha Bagchi Partha_Bagchi at hgsi.com
Thu Mar 25 15:09:24 CET 1999


Hello,
Perhaps I am missing something here about the function structure() (Platfrm etc.
in the end?


> structure(1:6, dim= 2:3)
     [,1] [,2] [,3]
[1,]    1    3    5
[2,]    2    4    6
> structure(1:6, dim= 3:2)
     [,1] [,2]
[1,]    1    4
[2,]    2    5
[3,]    3    6
> structure(1:2, dim= 1:2)
     [,1] [,2]
[1,]    1    2
> structure(1:2, dim= 2:1)
     [,1]
[1,]    1
[2,]    2
> structure(1:3, dim= 3:1)
Error: dim<- length of dims do not match the length of object
> structure(1:3, dim= 1:3)
Error: dim<- length of dims do not match the length of object
> structure(1:4, dim= 2:2)
Error: dim<- length of dims do not match the length of object
> structure(1:4, dim= 1:4)
Error: dim<- length of dims do not match the length of object
> version
           _
platform   Windows
arch       x86
os         Win32
system     x86, Win32
status     Beta
status.rev 0
major      0
minor      63.3
year       1999
month      March
day        6
language   R
>

TIA for any explanations
Partha.



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list