Displaying 20 results from an estimated 10000 matches similar to: "daily time series in R"
2011 Mar 24
2
Help with creating a ts (time series) object with daily sampling values
Hi All,
I have a data set of daily measurements of river flow. I would like to
create a "ts" object from this data.
Here's a sample data set:
date <- as.Date(c(1:300), format="%Y")
year=as.numeric(format(date, format = "%Y"))
month=as.numeric(format(date, format = "%m"))
julianday=as.numeric(format(date, format = "%j"))
2003 Mar 04
0
tseries contains a class for irregularly spaced time series
A new version of tseries (0.9-10) has been uploaded to CRAN. The new
version contains the class "irts" for irregularly spaced time series.
Irregular time series are basically time series where each observation
(uni- or multivariate) has a time-stamp represented by an object of
class "POSIXct". It provides some basic functionality such as reading
and writing irregular time
2003 Mar 04
0
tseries contains a class for irregularly spaced time series
A new version of tseries (0.9-10) has been uploaded to CRAN. The new
version contains the class "irts" for irregularly spaced time series.
Irregular time series are basically time series where each observation
(uni- or multivariate) has a time-stamp represented by an object of
class "POSIXct". It provides some basic functionality such as reading
and writing irregular time
2009 Aug 18
1
aggregating values at discreet irregular time intervals into hourly values
Hello R users,
I'm a newby to R (and programming software at large) and I would need some help to sum up event data at discreet time and irregular time interval into a hourly frequency.
Here is an example of my time series frame (irregular time-serie object - irts in the tseries package):
time value
2008-12-19 19:11:03 GMT 1
2008-12-19 19:12:00 GMT 0
2008-12-19
2003 Nov 20
2
ts format for daily time serie
Hi R-users:
How can I format a daily time serie with ts function
so the plot of the time shows the date right
(dd/mm/yy) or yy.xxxx ?
Excerp of the database:
FECHA TRM
1 01/01/2000 1873.77
2 02/01/2000 1873.77
3 03/01/2000 1873.77
4 04/01/2000 1874.35
5 05/01/2000 1895.97
.
.
.
1397 10/11/2003 2843.82
1398 11/11/2003 2840.41
1399 12/11/2003 2840.41
1400 13/11/2003
2004 Jul 23
1
ts to irts
Hi R-list,
I'm working with irregular time series (time series of climate data,
daily data 365/6 days a year) and would like to create regular time
series from them ( irts
e.g. Rain <-
irts(as.POSIXct(Climate[,1]),Climate[,5])
to ts
e.g. test <- ts(x, start=c(1997,1), frequency=365) )
such that I can find where the gaps (lacking temperature data, ...) are
and try
2003 Jun 06
3
irregular time-series
I make quite a lot of use of irregular time-series, and had already spent a
bit of time writing an 'its' class when the 'irts' class was released via
the package 'tseries'.
I have experimented with the 'irts' class, and have some practical issues
with its use. In some applications of irregular time-series (in my case
these are financial and econometric) there are
2011 May 28
1
How to do operations on zoo/xts objects with Monthly and Daily periodicities
Is there an elegant way to do operations (+/-/*/ / ) on zoo/xts objects when
one serie is monthly (end of month) and the other daily (weekdays only) -
typically a monthly economic indicator and a stock index price?
Thanks,
TDB
--
View this message in context: http://r.789695.n4.nabble.com/How-to-do-operations-on-zoo-xts-objects-with-Monthly-and-Daily-periodicities-tp3558081p3558081.html
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
2003 Oct 22
2
High frequency time-series
Having to collect hourly electricity loads and quarter-of-an-hour electricity production data for some years I think that the tidiest way of doing it is to resort to ts but I don't know how to define such a frequency starting from a set date.
Leafing through r-help mail archives I've found this *ALMOST* satisfactory message:
==========================================================
2009 Oct 21
2
three related time series with different resolutions
I have three time series, x, y, and z, and I want to analyse the
relations between them. However, they have vastly different
resolutions. I am writing to ask for advice on how to handle this
situation in R.
x is a stimulus, and y and z are responses.
x is a rectangular pulse 4 sec long. Its onset and offset are known
with sub-millisecond precision. The onset varies irregularly -- it
doesn't
2011 Jul 22
1
Summing values by weekday and weekend - based on daily dates
Hi, all
Here I created a data frame like
mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day")
myvalues<-runif(43,0,1)
myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues)
dates day value
1 2010-05-29 Saturday 0.14576143
2 2010-05-30 Sunday 0.37669604
3 2010-05-31 Monday 0.74813943
4 2010-06-01 Tuesday
2011 Jul 22
1
Summing daily values by weekday and weekend
(Sorry for reposting. Please delete previous msgs. Thanks!)
Hi, all
Here I created a data frame like
mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day")
myvalues<-runif(43,0,1)
myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues)
dates day value
1 2010-05-29 Saturday 0.14576143
2 2010-05-30 Sunday 0.37669604
2011 Mar 09
2
Complex sampling?
R users,
I am trying to generate a randomized weekday survey schedule that ensures even coverage of weekdays in
the sample, where the distribution of variable DOW is random with respect to WEEK. To accomplish this I need
to randomly sample without replacement two weekdays per week for each of 27 weeks (only 5 are shown). However,
I need to sample from a sequence (3:7) that needs to be
2008 May 10
1
irregular time series and multiple, overlaid plots
I am new to R and am trying to solve the following problem:
I have a data file containing tick-by-tick, millisecond level prices for
some stocks. I have another file or two containing orders and trades,
again, with millisecond time-stamps. Both of these files are irregularly
spaced and the time stamps are in an iso format (<date>
<time>.<millisecond>)
I would like to create a
2003 May 18
2
irregular ts plot?
hi guys: sorry, one more. I have irregularly spaced time series, often
with big gaps. a good analogy is:
tsvec <- ts(c(1,NA,2,NA,1, NA, 2),freq=12, start=c(1965,12))
Unfortunately, plot( tsvec ) does not plot the data. is it possible to
convince plot to just ignore the NA items (either with points or lines)
help appreciated.
/iaw
2009 May 25
1
Working with daily data
Hello
I have daily S&P 500 from 1950 for which I would like to do some time
series analysis in R. Could someone please show me an example of how to
create a ts/ irts object for my data? Additionally, how do I create
monthly subsamples of the data. I've experimented with the window
function but haven't had any luck.
Thank you
Ian
Confidential: This electronic message and
2002 Feb 11
2
Time Series ts() Objects
Hi,
Is it possible to create a ts() object, whose data is daily based BUT
measured only on working days?
In other words, suppose I have a data set with 255 observations, measured
from 29 June 1959 to 30 June 1960. How would I create such a data? I
tried something like:
ts(c(...), start(1959, 180))
but I'm not sure what to use for frequency. In other words I don't know
how to
2005 Jul 12
3
using its to import time series data with uneven dates
Good day:
I am trying to use
readcsvIts("nwr_data_qc.txt",informat=its.format("%Y%m%d%h%M
%Y"),header=TRUE,sep="",skip=0,row.names=NULL,as.is=TRUE,dec=".")
to read in a file (nwr_data_qc.txt) that looks like this:
Time Y M D H Min CO2
2000.18790 2000. 3. 9. 18. 30. 373.60
2000.20156 2000. 3. 14. 18. 30. 373.34
2011 Oct 08
1
Filling missing days in xts time series
Hi,
I have a bunch of irregularly spaced xts time series (with a POSIX index),
and I'm trying to write a function that fillls the missing days. Using a
solution suggested by Gabor Grothendieck for zoo, I wrote the following:
# FD: Fill missing days
FD<-function(ser) {rng<-range(time(ser))
> temp<-merge(ser,xts(,seq(rng[1],rng[2],"day")))
>