[R] How to identify data structure?

Sarah Goslee sarah.goslee at gmail.com
Sat Jan 21 19:24:39 CET 2012


str() is the most informative; class() may also be helpful.

> data(AirPassengers)
> class(AirPassengers)
[1] "ts"
> str(AirPassengers)
 Time-Series [1:144] from 1949 to 1961: 112 118 132 129 121 135 148
148 136 119 ...

For cases like this, with data included in R and documented,
?AirPassengers
is also useful. You might also want to read ?ts

Sarah

On Sat, Jan 21, 2012 at 1:12 PM, Ajay Askoolum <aa2e72e at yahoo.co.uk> wrote:
> data(AirPassengers) brings AirPassengers into the workspace. How can I  idenfity what the structure of AirPassengers is? Is it a data.frame, a table etc. etc.
>

-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list