Displaying 20 results from an estimated 11000 matches similar to: "zoo timeserie continuous? complete with NaN"
2007 Nov 21
2
Reconstruct array dataset
Hi there
I have an interesting problem:
My csv file is of array dimensions [12,50], but it was saved the wrong way: there should be only 11 colums. What happens now if I read it into R is that the whole data set is shifted ( in the first row, the last column contains already the first value of the supposed second row and so on...)
how can I tell R to switch after 11 read values to the next row,
2007 Oct 11
1
strange: yaxis inversion with zoo not possible?
hej there
I want to invert the yaxis as follows:
x<-rnorm(1:50)
plot(x^2, type="h", ylim=c(0,10))
plot(x^2, type="h", ylim=c(10,0))
then doing the following it won't work - kind of strange isn't it?
x.zoo<-zoo(x^2)
plot(x.zoo, type="h", ylim=c(10,0))
plot(x.zoo, type="h", ylim=c(0,10))
how can I invert the axis with zoo objects?
Marc
--
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?
2007 Sep 27
3
different colors for two wireframes in same plot
Hello R,
According to:
g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2)
g$z <- log((g$x^g$g + g$y^2) * g$gr)
wireframe(z ~ x * y, data = g, groups = gr,
scales = list(arrows = FALSE),
drape = TRUE, colorkey = TRUE,
screen = list(z = 30, x = -60))
i have two wireframes in one plot.
How could i change the color of the top - one to transparent (or only the grid).
2007 Oct 23
3
sum variable as long condition is true
Hello R
For expierienced user, the following problem will be easy to solve:
a<-c(0,1,0,1,0,2,3,4,3,2)
b<-c(3,3,3,4,4,4,7,7,7,10)
c<-data.frame(a,b)
Data Frame c contains tow colums. I would like to sum up all values in a as long as b stays the same:
sum(a[which(b==1)])
does this, but i have to manually put in b
then i tryied st like this, but i canno't save it properly
for (i
2003 Jul 30
2
STL- TimeSeries Decomposition
Dear R Helpers,
Currently I'm working with the ts package of R and created a TimeSerie
from pixels extracted from satellite imagery(S10 NDVI data, 10 daily
composites). I'm trying to decompose this signal in different signals
(seasonal and trend).
When testing out the STL method is says => Only univariate timeseries
are allowed, but the current Timeserie I'm using is univariate!
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 Sep 19
3
layout function for several plots
Dear all
I try to print 9 plots on a page, arranged as the code shows below.
nf <- layout(matrix(c(1,0,2,0,0,3,0,4,0,5,0,6,0,0,0,0,7,0,8,9), 10,2))
layout.show(nf)
but when I try to plot, an error message
Fehler in plot.new() : Grafikr?nder zu gro?
appears
to verify p.e. with
plot(runif(10:1))
i tried with plot(runif(10:1), ann=F) to produce more space, but neither.
The second
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
2009 Jul 10
1
getting a timeseries element into a string
I have a timeseries object, ts, and want to get the first date in the series
into a string so I can concatenate it with a SQL query. Input and output are
shown below. I must be missing something very basic, but I can't seem to
pry the data ("2008-07-01") into a string variable. Any suggestions would
be appreciated.
Thank you,
Andrew
=====script:
class(ts)
(ts[1,0]) #returns
2011 Mar 11
1
dataframe to a timeseries object
I?m wondering which is the most efficient (time, than memory usage) way to obtain a multivariate time series object from a data frame (the easiest data structure to get data from a database trough RODBC).
I have a starting point using timeSeries or xts library (these libraries can handle time zones), below you can find code to test.
Merging parallelization (cbind) is something I?m thinking at
2011 Jul 04
1
[R-SIG-Finance] FinCenter in timeSeries with "merge", "cbind" and "rbind"
Hi R users:
When I try to merge or bind (cbind or rbind) two series,
both with a "FinCenter" different that GMT, the
result is "GMT" not the original financial center?
What am I doing wrong?
######################################################
require(timeSeries)
getRmetricsOptions("myFinCenter")
setRmetricsOptions(myFinCenter = "America/Bogota")
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
2004 Jun 22
2
ts & daily timeseries
I have defined a daily timeseries for the 365 days of 2003 issuing:
myts = ts(dati[,2:10],frequency=365,)
> myts
Time Series:
Start = c(1, 1)
End = c(1, 365)
Frequency = 365
and
mytime = as.POSIXct(strptime(as.character(dati[,1]),format="%Y-%m-%d"))
contains the dates from "2003-01-01" to "2003-12-31"
How can I combine mytime and myts in order to list
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
2009 Nov 10
1
do.call and timeSeries
Does anyone know why the following code hangs on the do.call, but works
fine when I either comment out the require(timeSeries) or only do 2
levels of a for loop instead of 3?
Thanks,
Andrew Bierbryer
require(timeSeries)
num <- 1
x.list <- list()
for ( i in 1:10 ) {
for ( j in 1:20 ) {
for ( k in 1:30 ) {
x.list[[num]] <- cbind(num,10)
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
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:
>
2012 Dec 10
2
Removing named objects using rm(..)
When I import the library timeSeries I get (at least) the variable USDCHF
imported too.
I would like to delete it, but I cannot. As you can see below.
Clearly I am doing something wrong. What is it?
> library(timeSeries)
Loading required package: timeDate
> class(USDCHF)
[1] "timeSeries"
attr(,"package")
[1] "timeSeries"
> rm(list=c("USDCHF"))