David -
I'm a little confused about why you would call that indexing error
"trifling". It seems like a pretty serious problem with the zoo
internals although it seems to have been fixed in the latest version of
zoo.
Gabor -
Thank you. After updating to the latest version of zoo *and* restart
On Aug 29, 2011, at 3:33 PM, R. Michael Weylandt wrote:
Hmm, I don't know what this means as trouble shooting, but I get the
following:
snipped
4
> x[as.Date('2001-01-05')] = 0
> x
Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent
> str(x)
‘zoo’ s
On Mon, Aug 29, 2011 at 4:59 PM, Gene Leynes wrote:
> David -
> I'm a little confused about why you would call that indexing error
> "trifling". It seems like a pretty serious problem with the zoo
> internals although it seems to have been fixed in the latest version of
> zoo.
At one time zo
Michael,
By the way, although I replied to David's email, I was responding to you as
well. Your results were exactly what I was expecting, but I didn't get your
results.
On Mon, Aug 29, 2011 at 1:51 PM, R. Michael Weylandt <
michael.weyla...@gmail.com> wrote:
> How exactly do you mean it doesn
This seems like a very strange error.
In trying to troubleshoot this further I looked at the structure of x. The
new x has the length of the Index (2001-01-05 = 11327).
> library(zoo)
> x = zoo(1:5, as.Date('2001-01-01')+1:5)
> str(x)
zoo series from 2001-01-02 to 2001-01-06
Data: int [1:5]
On Mon, Aug 29, 2011 at 2:45 PM, Gene Leynes wrote:
> Why doesn't this work?
>
> x = zoo(1:5, as.Date('2001-01-01')+1:5)
> x[as.Date('2001-01-05')]
> x[as.Date('2001-01-05')] = 0
> x
>
Make sure you have the most recent version of zoo which is this:
> packageVersion("zoo")
[1] ‘1.7.4’
--
Stat
Hmm, I don't know what this means as trouble shooting, but I get the
following:
1) After library(zoo)
Attaching package: 'zoo'
The following object(s) are masked from 'package:base':
as.Date
and then for the first str(x)
zoo series from 2001-01-02 to 2001-01-06
Data: int [1:5] 1 2 3 4
On Aug 29, 2011, at 3:02 PM, Gene Leynes wrote:
Although I'm not sure what you're talking about with pop-up windows...
I got (as expected) assignment, so I assumed you were not expecting
assignment.
Weird, this is what I'm getting in either R 2.13.0 or R 2.12.0:
> library(zoo)
Warning
Although I'm not sure what you're talking about with pop-up windows...
Weird, this is what I'm getting in either R 2.13.0 or R 2.12.0:
> library(zoo)
Warning: package 'zoo' was built under R version 2.13.1
> x = zoo(1:5, as.Date('2001-01-01')+1:5)
> x[as.Date('2001-01-05')]
2001-01-05
4
On Aug 29, 2011, at 2:45 PM, Gene Leynes wrote:
Why doesn't this work?
x = zoo(1:5, as.Date('2001-01-01')+1:5)
x[as.Date('2001-01-05')]
x[as.Date('2001-01-05')] = 0
x
I think this is especially bad because it doesn't cause an error.
It lets
you do something to x, but then you can't see x
How exactly do you mean it doesn't work? Copied from my GUI:
> x = zoo(1:5, as.Date('2001-01-01')+1:5)
> x[as.Date('2001-01-05')]
2001-01-05
4
> x[as.Date('2001-01-05')] = 0
> x
2001-01-02 2001-01-03 2001-01-04 2001-01-05 2001-01-06
1 2 3 0 5
m
> Asst. Lee Hesketh
> Tel: +44-20-77773303
> Fax: +44-20-77422840
>
>
>
> "Gabor Grothendieck"
>
> 18/12/2008 04:07
>
> To
> tolga.i.uzu...@jpmorgan.com
> cc
> r-help@r-project.org
> Subject
> Re: [R] replacing elements of a zoo object
&
morgan.com
cc
r-help@r-project.org
Subject
Re: [R] replacing elements of a zoo object
Remove the comma in the line with the error.
On Wed, Dec 17, 2008 at 11:24 AM, wrote:
> Dear R Users,
>
> I am trying to do something quite simple: replace the elements of a zoo
> object. For some re
Remove the comma in the line with the error.
On Wed, Dec 17, 2008 at 11:24 AM, wrote:
> Dear R Users,
>
> I am trying to do something quite simple: replace the elements of a zoo
> object. For some reason, the following code does not seem to work. How can
> I replace the value for the 14th of Dec
Try this:
x[index(x) == as.Date("2008-12-14")] <- 1
x
On Wed, Dec 17, 2008 at 2:24 PM, wrote:
> Dear R Users,
>
> I am trying to do something quite simple: replace the elements of a zoo
> object. For some reason, the following code does not seem to work. How can
> I replace the value for the
If this were copy and paste-able then I could probably give you a
solution, but I would have a look at
?coredata
On Wed, Dec 17, 2008 at 11:24 AM, wrote:
> Dear R Users,
>
> I am trying to do something quite simple: replace the elements of a zoo
> object. For some reason, the following code do
16 matches
Mail list logo