Displaying 20 results from an estimated 10000 matches similar to: "Problems plotting a sparse time series in R"
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 Jan 24
1
Error using Rmetrics to read data
Hi folks. This set of code used to work, but after upgrading to the
latest version of Rmetrics it no longer does. Any ideas?
SP500<-read.table("SP500.csv",header=TRUE,sep=",")
> head(SP500)
Date Open High Low Close Volume Close2
1 8/4/2006 1280.26 1292.92 1273.82 1279.40 2530970112 1279.40
2 8/3/2006 1278.22 1283.96 1271.25 1280.27
2008 Nov 16
1
inconsistency between timeSeries and zoo causing a problem with rbind
Dear R Users and maintainers of packages zoo and timeSeries,
I believe there is a recently introduced inconsistency between
timeSeries and zoo which is causing a problem with rbind. I had
previously reported that I was having problems with rbind in the
following code:
library(zoo)
foo<-zoo(1,order.by=as.Date("2007-10-09"))
bar<-zoo(2,order.by=as.Date("2007-10-10"))
2011 Jan 27
1
Problem converting zoo object (daily data) to a timeSeries object
When I try to convert the zoo object to a timeSeries object, which would
allow me to utilize Rmetrics packages, I get an error message.
> Data<-read.zoo("c:\\DOWUBSPRICING.txt,na.strings="NA",sep="\t",header=T)
> is(Data)
"zoo"
> as.timeSeries.zoo(Data)
Error in .local (.Object, . )
Is this happening because I am using daily data?
2011 May 23
3
getting time series into r
Hi,
I am trying to get the following two timeseries (these are small subsets of the whole thing) into R so I can merge them using zoo.
Timeseries 1=[ Date Count
9/28/2003
1505
10/5/2003
1535
2008 Sep 04
1
modeling interval data, a.k.a. irregular timeseries
Greetings -- I've got some sensor data of the form
t1_1, t1_2
t2_1, t2_2
...
tN_1,tN_2
-- time intervals measuring starts and stops of sensor activity. I'd
like to see whether there's any regularity in it. Seems natural to
consider these data timeseries -- except most of the timeseries
packages and models assume regular ones, with a fixed frequency.
I wonder what's a
2013 Jan 11
1
overlaying zoo plots in lattice
Hello
Let's say I have a multivariate zoo timeseries (synchronised automatic
loggers at different places):
library(zoo)
library(lattice)
library(latticeExtra)
x<-zoo(data.frame(a=rnorm(100), c=rnorm(100), b=rnorm(100)),
seq(from=as.Date("2010-01-01"), by="day", length.out=100))
and a dataframe with manual control points at variable dates:
2007 Oct 02
2
zoo timeserie continuous? complete with NaN
dear r-list
I have a zoo object with 2 objects and time:
looks like:
2005-12-31 12:00:00 NA NaN
2005-12-31 13:00:00 NA NaN
2005-12-31 14:00:00 NA NaN
2005-12-31 15:00:00 NA NaN
2005-12-31 16:00:00 NA NaN
2005-12-31 18:00:00 NA NaN
2005-12-31 19:00:00 NA NaN
2005-12-31 20:00:00 NA NaN
2005-12-31 21:00:00 NA
2004 Nov 24
2
seriesMerge
Is there a function in R that is equivalent to S-PLUS's
seriesMerge(x1, x2, pos="union")
where x1, and x2 are of class timeSeries
seriesMerge is in S-PLUS's finmetrics. I looked into R's mergeSeries
(in fSeries part of Rmetrics) but I could not make it behave quite the
same. In R it expected a timeSeries object and a matrix of the same
row count. In S-PLUS when using the
2010 Dec 07
3
help on timeseries
i have time series of momentum signal. I want to get the date of each of the
"-1" signal period. for example , the first period of -1 signal begins on
2005-9-21 and ends on 2005-9-28. 2nd period of -1 signal begins on
2005-09-30 and ends on 2005-10-28.
Thx
Cameron
date Px 200MA Signals
2005-09-15 26.27 25.83865 1
2005-09-16 26.07 25.83275 1
2011 Mar 04
2
apply.rolling() to a multi column timeSeries
Hello there,
I am trying to compute the 3 months return momentum with the timeSeries x.ts,
which is just a subset of simple returns from a much bigger series,
> class(x.ts)
[1] "timeSeries"
attr(,"package")
[1] "timeSeries"
> dim(x.ts)
[1] 20 3
> x.ts[1:8,]
GMT
MS.US AAPL.US CA.FP
1996-01-31 0.15159065 -0.133391894
2011 Apr 04
3
How to speed up grouping time series, help please
I retrieve for a few hundred times a group of time series (10-15 ts
with 10000 values each), on every group I do some calculation, graphs
etc. I wonder if there is a faster method than what presented below to
get an appropriate timeseries object.
Making a query with RODBC for every group I get a data frame like this:
> X
ID DATE VALUE
14 3 2000-01-01 00:00:03 0.5726334
2011 Jul 26
1
intraday plot and gaps in data
Hi,
I have an intraday timeseries of financial data (see below) which has gaps
due to market opening and closing hours. I am trying to plot it, but the
time gap is always visible in the plot. I tried converting data to xts, zoo,
timeSeries and plotting it with different functions i.e. plot.xts, plot.zoo.
The only way to make it work was with function 'chartSeries' in the quantmod
package
2017 Sep 16
2
require help
You can just use the same code that I provided before but now use your
dataset. Like this
df <- read.csv(file="data2.csv",header=TRUE)
dates <- as.Date(paste(df$year,"-01-01",sep=""))
myXts <- xts(df,order.by=dates)
head(myXts)
#The last command "head(myXts)" shows you the first few rows of the xts
object
year cnsm incm wlth
2017 Sep 16
0
require help
> On 15 Sep 2017, at 11:38, yadav neog <yadavneog at gmail.com> wrote:
>
> hello to all. I am working on macroeconomic data series of India, which in
> a yearly basis. I am unable to convert my data frame into time series.
> kindly help me.
> also using zoo and xts packages. but they take only monthly observations.
>
> 'data.frame': 30 obs. of 4 variables:
2011 Nov 15
1
Creating Timeseries by manipulating data table
Hi,
I'm new to R and tried a search but couldn't find what I was looking for.
I have some data as a csv file with columns:-
longditude latitude year month rainfall region
What I need to do is produce a monthly time series for each region, where
region is an integer id and where each time point in the series is the
monthly average of rainfall for each location in that region.
Basically
2007 Nov 02
1
R timeDate does not allow seconds?
Hello, Sorry if anyone gets this message twice, as my mailserver may not
be working.
Thanks for your response. Your idea makes a lot of sense to me, but I've
been unable to get seconds to work.
I ended up with this format finally:
"2007-10-31_16:20:22"
Problem is I am unable to get it recognized as a date using timeDate():
R>
2017 Sep 16
0
require help
oky.. thank you very much to all of you
On Sat, Sep 16, 2017 at 2:06 PM, Eric Berger <ericjberger at gmail.com> wrote:
> You can just use the same code that I provided before but now use your
> dataset. Like this
>
> df <- read.csv(file="data2.csv",header=TRUE)
> dates <- as.Date(paste(df$year,"-01-01",sep=""))
> myXts <-
2009 Aug 12
3
Zoo and numeric data
Hi,
I have a csv file with different datatypes:
2009-01-01, character1, 10, 20.1
2009-01-02, character2, 11, 21.1
(I have attached the file to this post)
I read this file with read.zoo as I want a zoo/xts timeseries:
> t = read.zoo("./data.txt", sep=",", dec = ".", header=FALSE)
If I look at the zoo data all integer/numeric columns are read as
character:
>
2008 Nov 11
2
Manipulation in timeSeries object:how to use the function "applySeries" by daily?
Hi all
I have some tick-by-tick data and I have calculated the intraday returns. I
want to sum up the intraday squared returns to calculate the daily
volatility(or daily variance). I know that the s-plus FinMerics has the
function aggregateSeries function that can be apply to daily data:
aggregateSeries(x, Fun, by="daily"), but the counterpart function in
R:applySeries can not be apply