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. [[alternative HTML version deleted]]
On 21.01.2012 19:12, Ajay Askoolum 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.1. read the help page! ?AirPassengers 2. Look at the structure by str(AirPassengers) Uwe Ligges> [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
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