Re: [R] Data Structure to Code

2012-01-29 Thread Gabor Grothendieck
On Sun, Jan 29, 2012 at 11:36 AM, Ajay Askoolum wrote: > Thank you. I need some clarification. > > dput(AirPassengers) > > gives: > > structure(c(112, 118, 132, 129, 121, 135, 148, 148, 136, 119, > 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, > 140, 145, 150, 178, 163, 172, 178

Re: [R] Data Structure to Code

2012-01-29 Thread David Winsemius
On Jan 29, 2012, at 11:36 AM, Ajay Askoolum wrote: Thank you. I need some clarification. dput(AirPassengers) gives: structure(c(112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184,

Re: [R] Data Structure to Code

2012-01-29 Thread R. Michael Weylandt
You said something about extracting January to June -- that's not so possible with the default ts (best I understand it): ts() only allows regular time-series so you can't go jan to jun at 1 month intervals and then jump to jan again (6 months). If you want irregular time series, check out the zoo

Re: [R] Data Structure to Code

2012-01-29 Thread Ajay Askoolum
Thank you. I need some clarification. dput(AirPassengers) gives: structure(c(112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166, 171, 180, 193, 181, 183, 218, 230, 2

Re: [R] Data Structure to Code

2012-01-29 Thread Florent D.
see dump() or dput(). On Sun, Jan 29, 2012 at 10:56 AM, Ajay Askoolum wrote: > Given: > > data(AirPassengers) > > I get a ts data structure AirPassengers in the workspace. > > How can I generate the code that can create that structure? That is, given an > example of a data structure, is there a

Re: [R] Data Structure to Code

2012-01-29 Thread R. Michael Weylandt
dput() Michael On Sun, Jan 29, 2012 at 10:56 AM, Ajay Askoolum wrote: > Given: > > data(AirPassengers) > > I get a ts data structure AirPassengers in the workspace. > > How can I generate the code that can create that structure? That is, given an > example of a data structure, is there a way to

[R] Data Structure to Code

2012-01-29 Thread Ajay Askoolum
Given: data(AirPassengers) I get a ts data structure AirPassengers in the workspace. How can I generate the code that can create that structure? That is, given an example of a data structure, is there a way to generate the code that can greate that structure? Alternatively, is there a refere