11200
4 -0.7568025
x3<-zoo(x)
names(x3)<-"test"
names(x3)
#NULL
A.K.
- Original Message -
From: David Winsemius
To: jpm miao
Cc: R-help@r-project.org; Achim Zeileis
Sent: Friday, August 10, 2012 1:18 AM
Subject: Re: [R] Zoo object problem: Find the column name of a uni
On Thu, Aug 9, 2012 at 9:54 PM, jpm miao wrote:
> Hi Michael,
>This is my problem. Could you find out how I can find the column name of
> the zoo object "xzoo"? I am expecting "EUR".
>
>Thanks,
>
> Miao
>
>
>
>> x<-read.csv("A_FX_EUR_Q.csv", header=TRUE)
>> x[1:4,]
> TIME EUR
> 1 1
On Aug 9, 2012, at 7:54 PM, jpm miao wrote:
Hi Michael,
This is my problem. Could you find out how I can find the column
name of the zoo object "xzoo"? I am expecting "EUR".
To repeat what Michael wrote:
zoo allows (but does not require) the data to have a dim attribute,
as with any o
Hi Michael,
This is my problem. Could you find out how I can find the column name of
the zoo object "xzoo"? I am expecting "EUR".
Thanks,
Miao
> x<-read.csv("A_FX_EUR_Q.csv", header=TRUE)> x[1:4,]TIME EUR
1 198001 1.41112
2 198002 1.39108
3 198003 1.42323
4 198004 1.34205> xzoo<-
On Aug 9, 2012, at 8:32 PM, jpm miao wrote:
> Hi everyone and Achim,
>
> Achim, I appreciate your help about the function "NCOL". When I use
> "NCOL" instead of "ncol", I can find out the number of columns (number of
> time series) in the presence of only one time series (one variable, one
>
On Aug 9, 2012, at 6:32 PM, jpm miao wrote:
Hi everyone and Achim,
Achim, I appreciate your help about the function "NCOL". When I use
"NCOL" instead of "ncol", I can find out the number of columns
(number of
time series) in the presence of only one time series (one variable,
one
column
Hi everyone and Achim,
Achim, I appreciate your help about the function "NCOL". When I use
"NCOL" instead of "ncol", I can find out the number of columns (number of
time series) in the presence of only one time series (one variable, one
column).
Now I want to know how I can find out the col
On Thu, 9 Aug 2012, jpm miao wrote:
Hi,
Part of my program is to calculate the number of time series in a zoo
object. It works well if it has more than one time series, but it fails if
it has only one. How can I access the number of column (i.e. the number of
time series) when I have only one
Hi,
Part of my program is to calculate the number of time series in a zoo
object. It works well if it has more than one time series, but it fails if
it has only one. How can I access the number of column (i.e. the number of
time series) when I have only one column? Why is the number of an objec
Here are a few more examples:
> ym <- seq(from = as.Date("1999-10-05"), to = as.Date("2000-06-05"),
+ by = "month")
>
> z <- zoo(matrix(seq_len(length(ym) * 5), 5))
> colnames(z) <- format(ym, "X%d.%b.%y")
> z
X05.Oct.99 X05.Nov.99 X05.Dec.99 X05.Jan.00 X05.Feb.00 X05.Mar.00 X05.Apr.00
1
On Thu, 11 Feb 2010, Research wrote:
Hello,
I have large zoo objects (about 100 or more time series merged next to
eachother). Example:
X05.Oct.99 X05.Nov.99 X05.Dec.99 X05.Jan.00 X05.Feb.00 X05.Mar.00
X05.Apr.00 X05.May.00 X05.Jun.00
[1,] 5649.3 5679.4 5679.4 5679.4
Hello,
I have large zoo objects (about 100 or more time series merged next to
eachother). Example:
X05.Oct.99 X05.Nov.99 X05.Dec.99 X05.Jan.00 X05.Feb.00 X05.Mar.00
X05.Apr.00 X05.May.00 X05.Jun.00
[1,] 5649.3 5679.4 5679.4 5679.4 5679.4
5679.4 5679.4 567
Try this:
> window(old, time(new)) <- ifelse(is.na(new), old[time(new)], new)
> old
PPAR pcp
(05/19/06 23:58:00) NA NA NA
(05/20/06 00:00:00) 956.23 252.30 NA
(05/20/06 00:02:00) 955.68 244.85 0
(05/20/06 00:04:00) 955.70 236.45 0
(05/20/06 00:06:00) 955.
Gabor,
Many thanks for your suggestion. This solution is very close, but not exactly
what I had in mind, because na.omit removes the entire row in which an NA
appears. I want to replace values in old with non-NA values from corresponding
times in new. If a timestamp from old does not appear
An example that included input and output would help. I'll take a guess but if
that's not it please clarify and provide that.
Also its helpful if you can provide the data in easily copied form
using dput(z).
I will assume that time(New) is a superset of time(Old) and "put them in" means
replace
Hello,
I have two zoo objects, new and old, indexed by chron objects. Their structure
is like this:
(05/25/06 00:00:00) NA NA NA
(05/25/06 00:02:00) 948.20 24.198 0
(05/25/06 00:04:00) 948.26 20.640 0
(05/25/06 00:06:00) 948.37 19.653 0
(05/25/06 00:08:00) 948.48 19.135 0
(05/2
1. This is not reproducible.
Lines was not provided in reproducible form.
Please look at my prior emails and use that
form so that one can copy from your post and
paste it directly into R and observe the error.
2. What do you mean by does not plot? Do you get
an error or does nothing appear? If
DateTimeRM61
11/30/2006 12:31NA
11/30/2006 12:46NA
11/30/2006 13:012646784125
11/30/2006 13:16NA
11/30/2006 13:31NA
11/30/2006 13:46NA
11/30/2006 14:012666435177
11/30/2006 14:16NA
11/30/2006 14:31NA
11/30/2006 14:46
On Mon, 14 Jan 2008, Gabor Grothendieck wrote:
> Create a sequence of dates, dd, spanning the data and
> then merge the data with a zero width zoo object
> having those dates. Finally na.locf will fill in the
> NAs just generated with the last ocurrence carried forward.
>
> z <- zoo(c(0.007306621
Create a sequence of dates, dd, spanning the data and
then merge the data with a zero width zoo object
having those dates. Finally na.locf will fill in the
NAs just generated with the last ocurrence carried forward.
z <- zoo(c(0.007306621, 0.007659046, 0.007681013,
0.007817548, 0.00784757
I have an ordered series of 3 month t-bill rates (annual). I transform
this to a daily series, however, the observations are constructed only
from the dates on which the t-bills were issued, which is every week.
So now I have ordered observations of the daily 'risk-free rate' for
one day every wee
21 matches
Mail list logo