Displaying 20 results from an estimated 10000 matches similar to: "Calculating weekly/bi-monthly average for time series data"
2017 Oct 06
2
Time series: xts/zoo object at annual (yearly) frequency
Hi,
I'd like to make a time series at an annual frequency.
> a<-xts(x=c(2,4,5), order.by=c("1991","1992","1993"))
Error in xts(x = c(2, 4, 5), order.by = c("1991", "1992", "1993")) :
order.by requires an appropriate time-based object
> a<-xts(x=c(2,4,5), order.by=1991:1993)
Error in xts(x = c(2, 4, 5), order.by =
2011 Feb 16
1
Timeseries Data Plotted as Monthly Boxplots
Hello, I'm trying to develop a box plot of time series data to look at the
range in the data values over the entire period of record.
My data initially starts out as a list of hourly data, and then I've been
using this code to make this data into the final ts array.
# Read in the station list
stn.list <- read.csv("/home/kbennett/fews/stnlist3", as.is=T, header=F)
# Read in
2010 Jan 01
1
Chainging monthly data to daily data
Hi, I have a zoo object with monthly frequency :
library(zoo)
dat <- zooreg(rnorm(50), as.yearmon("2000-01-01"), frequency=12)
Now I want to make a zoo object with daily frequency from "dat" wherein
value for a each day for a particular month will be value of "dat" at that
particular month.
Is there any easy way to do that?
Thanks,
--
View this message in
2009 Sep 16
0
Change "bi-weekly" newsletter on "FrontPage" to "monthly"
Dear all,
FrontPage currently mentions a bi-weekly newsletter. This should be
changed to "monthly".
Regards,
Timothy Lee
2010 Nov 23
2
Plot two zoo object with different indexes
Dear R community, I have the following two zoo objects:
MONTHLY CPI
> plot(z)
> par("usr")
[1] 1977.76333 2011.15333 70.39856 227.03744
> z=zooreg(cpius$Value,as.yearmon("1979-11"),frequency=12)
> str(z)
?zooreg? series from Nov 1979 to Oct 2010
Data: num [1:372] 76.2 77 77.8 78.5 79.5 80.3 81.1 82 82 82.6 ...
Index: Class 'yearmon' num [1:372]
2010 Apr 18
4
confused with yearmon, xts and maybe zoo
R-listers,
I am using xts with a yearmon index, but am getting some inconsistent
results with the date index when i drop observations (for example by using
na.omit).
The issue is illustrated in the example below. If I start with a monthly
zooreg series starting in 2009, yearmon converts this to "Dec-2008". Not
such a worry for my example, but strange. Having converted to xts, i drop
2007 Jan 26
2
how to create daily / weekly ts object?
Dear All,
Monthly and Quarterly ts obj. is easy to understand. But I couldn't
find an example in R manual how to create daily or weekly ts object.
Could you please shed some light on it?
I really appreciate it.
2006 Oct 26
1
Up- or downsampling time series in R
Hi
I have data that is sampled (in time) with a certain frequency and I would
like to express this time series as a time series of a higher (or lower)
frequency with the newly added time points being filled in with NA, 0, or
perhaps interpolated. My data might be regularly or irregularly spaced. For
example, I might have quarterly data that I would like to handle as a
monthly time series with
2008 Mar 30
2
convert weekly time series data to monthly
I have weekly time series data with year, month, day, and price variables.
The input data set for the weekly series takes the following form:
Year month day price
1990 8 20 119.1
1990 8 27 124.5
1990 9 3 124.2
1990 9 10 125.2
1990 9 17 126.6
1990 9 24 127.2
1990 10 1 132.1
1990 10 8 133.3
1990 10 15 133.9
1990 10 22 134.5
1990 10 29 133.9
.. ... ... ...
... ... .... ....
2008 3 3 313.7
2008
2012 Apr 16
1
How to create a data.frame from several time series?
Hello all,
please look at my code below. The problems start where it says #
PROBLEMS START HERE. Some sample data is at the very bottom.
This is the disgnostic output from the script:
> source('load.R')
ts.null
1 NA
2 NA
3 NA
4 NA
5 NA
6 NA
[1] "Adding data" "VS1A"
ts.null VS1A.ts.null VS1A.tts
1 NA NA NA
2
2009 Dec 22
1
Using zoo() to aggregate daily data to monthly means
I am trying to get monthly means for a daily data series using zoo(). I have
found an odd problem, that seems to be caused by zoo()'s handling of leap
years.
Here's my R script with 2 methods (freq=365, 366) for aggregating the daily
data to monthly series:
library(zoo)
J_link <- "http://www.ijis.iarc.uaf.edu/seaice/extent/plot.csv"
JAXA_data <- read.table(J_link,
2009 Jan 12
3
roll weekly data to monthly level
Dear R users:
I have a data set that looks something like this:
ID time y
1 2/01/2008 4
1 2/09/2008 12
1 9/01/2008 8
2 1/06/2008 3
2 3/01/2008 4
2 3/09/2008 9
2 6/03/2008 4
3 1/02/2008 3
3 1/10/2008 8
3 2/02/2008 7
3 2/10/2008 3
I'd like to sum up the weekly data to the monthly level, so that it looks
something
2007 Sep 20
1
Time series graphs, question about using zoo
Hi,
Can you tell me what is the meaning for "tail, 1" in "aggregate"?
I also want to get some similar graph, but the data is not time series data.
Suppose here is my data one, I want a graph with x-axis is just the
index(1:9).
The graph plot all the variable A, B,C,D. So there should be 4 lines for
each graph. For the A line, at each time point, the letter A should be on
2010 Apr 08
2
Meaning of "lag 0.2, 0.4,..." ?
Please see that correlogram for a arbitrary time series :
acf(zooreg(rnorm(39), start=as.yearmon("2008-01-01"), frequency=12))
What is the meaning of lag 0.2, 0.4, ........ in the plot? Those should not
be integers? Or I am missing something?
Thanks
--
View this message in context: http://n4.nabble.com/Meaning-of-lag-0-2-0-4-tp1765093p1765093.html
Sent from the R help mailing list
2011 Apr 06
2
A zoo related question
Dear all, please consider my following workbook:
library(zoo)
lis1 <- vector('list', length = 2)
lis2 <- vector('list', length = 2)
lis1[[1]] <- zooreg(rnorm(20), start = as.Date("2010-01-01"), frequency = 1)
lis1[[2]] <- zooreg(rnorm(20), start = as.yearmon("2010-01-01"), frequency =
12)
lis2[[1]] <- matrix(1:40, 20)
lis2[[2]] <-
2007 Sep 21
0
Time series graphs, question about using zoo [SEC=UNCLASSIFIED]
Hi Fang,
An easy way of doing this is by:
> matplot(one, pch = LETTERS[1:4], type = 'b')
Cheers Joe
Joe Crombie
Information and Risk Sciences
Bureau of Rural Science
Canberra Australia
p: +61 2 6272 5906
e: joe.crombie at brs.gov.au
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of fang liu
Sent: Friday,
2010 Jul 12
3
How to create sequence in month
Hi all, can anyone please guide me how to create a sequence of months? Here
I have tried following however couldn't get success
> library(zoo)
> seq(as.yearmon("2010-01-01"), as.yearmon("2010-03-01"), by="1 month")
Error in del/by : non-numeric argument to binary operator
What is the correct way to do that?
Thanks for your time.
2008 Jun 29
1
Calculating quarterly statistics for time series object
I have time series observation on daily frequencies :
library(zoo)
SD=1
date1 = seq(as.Date("01/01/01", format = "%m/%d/%y"), as.Date("12/31/02", format = "%m/%d/%y"), by = 1)
len1 = length(date1); data1 = zoo(matrix(rnorm(len1, mean=0, sd=SD*0.5), nrow = len1), date1)
plot(data1)
Now I want to calculate 1. Quarterly statistics like mean, variance etc
2008 Aug 18
1
Converting monthly data to quarterly data
Dear R users,
I have a dataframe where column is has countries, column 2 is dates
(monthly) for each countrly, the next 10 columns are my factors where I have
measurements for each country and for each date. I have attached a sample
of the data in csv format with the data for 3 countries.
I would like to convert my monthly data into quarterly data, finding the
mean over 3 month periods for
2008 Aug 19
0
Converting monthly data to quarterly dataMonday, August 18, 2008 11:38 AM
Dear Gavin,
This is really great, thank you! I created some long loops to get rid of
extra months at the beginning and the end of my data but your code is great
for putting it then together quarterly.
thanks again,
Denise
On Mon, 2008-08-18 at 14:31 +0100, Denise Xifara wrote:
> Thank you very much Stephen, but how will aggregate deal with months that
> fall outside annual quarters? eg,