[R] construct a data set
R. Michael Weylandt <email@example.com>
michael.weylandt at gmail.com
Thu Jul 28 14:12:12 CEST 2011
Well, depending on how similar you want/need it to be, you could simply make a copy and directly modify it as desired;
AP2 <- AirPassengers
AP2$tsp <- c(3,4,5) # or whatever
It's quick and dirty but sounds like it works for you. Write back if this isn't clear or if you care to provide more info on what you want to do.
Cheers and good luck getting started in R.
On Jul 28, 2011, at 5:27 AM, nandan amar <nandan.amar at gmail.com> wrote:
> i want to construct a data set similar to "AirPassengers".
> Its attributes are following.
>  1949.000 1960.917 12.000
>  "ts"
> How Can I construct a data set similar to it having same class and attributes.
> Amar Kumar Nandan
> ✉:nandan.amar at gmail.com
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help