On Mon, 6 Jun 2005, Andy Bunn wrote:
R > w <- list(rnorm(10), rnorm(10))
R > x <- ts(w, start = 1980)
Even though you don't get an error message this statement is
erroneous. ?ts discusses the valid possibilities.
So it does, might I suggest add something like this to ts:
if (is.list(dat
> >
> > R > w <- list(rnorm(10), rnorm(10))
> > R > x <- ts(w, start = 1980)
>
> Even though you don't get an error message this statement is
> erroneous. ?ts discusses the valid possibilities.
So it does, might I suggest add something like this to ts:
if (is.list(data))
stop("Data
On 6/5/05, Andy Bunn <[EMAIL PROTECTED]> wrote:
> > some_df[1, ] is actually a data frame: see ?"[.data.frame". It's hard to
> > see what else it could be, as columns of a data frame are of arbitrary
> > classes.
>
> I see, I was confusing class and mode. However, since a list can be a ts
> objec
> some_df[1, ] is actually a data frame: see ?"[.data.frame". It's hard to
> see what else it could be, as columns of a data frame are of arbitrary
> classes.
I see, I was confusing class and mode. However, since a list can be a ts
object as in this example:
R > w <- list(rnorm(10), rnorm(10))
R
some_df[1, ] is actually a data frame: see ?"[.data.frame". It's hard to
see what else it could be, as columns of a data frame are of arbitrary
classes.
When you apply matrix() to a data frame it gets dropped to a list.
On Sat, 4 Jun 2005, Andy Bunn wrote:
Adam:
Providing a reproducible e
Andy Bunn whrc.org> writes:
:
: Adam:
: > Providing a reproducible example would be a first step...
:
: That's the problem, I can't. But I str has come to the rescue:
We can provide it in a reproducible way like this:
dput(rw)
dput(pg)
That will output both in a format that anyone else can p
Adam:
> Providing a reproducible example would be a first step...
That's the problem, I can't. But I str has come to the rescue:
R > str(rw)
Time-Series [1:307] from 1690 to 1996: 0.986 1.347 1.502 1.594 1.475 ...
R > str(pg)
List of 264
$ : num 0.227
$ : num 0.189
$ : num 0.237
$ : num 0.23
Andy:
> I have a mv ts object:
>
> R > tsp(pg)
> [1] 1982 20031
> R > dim(pg)
> [1] 22 12
>
> and a univariate ts:
>
> R > tsp(rw)
> [1] 1690 19961
>
> Yet, when I try to intersect them:
>
> R > tsp(ts.intersect(rw, pg))
> [1] 1982 21761
>
> the process goes awry.
>
> How to I get rw a
This seems like a FAQ, but I can't figure it out.
I have a mv ts object:
R > tsp(pg)
[1] 1982 20031
R > dim(pg)
[1] 22 12
and a univariate ts:
R > tsp(rw)
[1] 1690 19961
Yet, when I try to intersect them:
R > tsp(ts.intersect(rw, pg))
[1] 1982 21761
the process goes awry.
How to