similar to: dumping/loading objects with 'tsp' attribute

Displaying 20 results from an estimated 4000 matches similar to: "dumping/loading objects with 'tsp' attribute"

2007 Nov 24
1
patch proposal for plot.ts
Hi all. Currently, if you try: > lag.plot(1:10) you get superposed labels '1' and '10'. Things go worse in more extreme cases: x <- ts(1:10) x1 <- lag(x, 4) plot(x1, x) This is due to a mistake in plot.ts. My suggestion is the following really minimal patch to plot.ts: @@ -530,7 +530,7 @@ plot.ts <- text(xy, labels =
2009 Nov 20
2
How to setup the tsp attribute of a dataset
Hello, I am wondering how I should set up the tsp attribute (available through attr(x, "tsp")) of a dataset x? Let's assume that x has 100 points, and I want to set the frequency to 4. I tried: > attr(x,"tsp")<-c(1,100,4) Error in attr(x, "tsp") <- c(1, 100, 4) : invalid time series parameters specified Is there any other way to set the frequency of
1998 Sep 28
1
"tsp<-"
If value is NULL I think tsp assignment should not return a class ts object. Below is a fixed version. Paul Gilbert ____ "tsp<-" <-function(x, value) {if (is.null(value)) {attr(x, "tsp") <- value if(inherits(x,"ts")) class(x) <- NULL return(x) } attr(x, "tsp") <- value class(x) <- "ts" x }
2011 Aug 19
3
ATSP to TSP reformulation
Greetings, I am having trouble getting the function reformulate_ATSP_as_TSP to work for me. I have provided a simple example of some of the code I've been using. In particular, I'm not sure why I'm getting the error "Error in dimnames(tsp) <- list(lab, lab) : length of 'dimnames' [1] not equal to array extent" since I created the object ATSP with a valid
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
2005 May 15
0
list TSP-SHARE: List Message Rejected
Dear samba@lists.samba.org: Your recent message to the TSP-SHARE list has been rejected for the following reason: Only list subscribers may send messages to this list. If you need assistance, please contact the list owner at TSP-SHARE-request@ucdavis.edu The text of your message follows: ---------------------------------------------------------------------- Received: from havana.ucdavis.edu
2011 Oct 27
1
plotting large time series
hello, I got a problem with plotting large time series, since I want to store the results in a .PDF file (I want to store several pages of plots). The PDF files get too large to be handled (> 10MB, one was even 200MB big). So I wonder, if there would be a possibilty to either - reduce the file size of the PDF - change the way the plot is generated to reduce the plot size? I use:
2013 Oct 23
2
Multivariate time series in R 3 vs R 2
Hello! Recently I got report that my package mar1s doesn't pass checks any more on R 3.0.2. I started to investigate and found the following difference in multivariate time series handling in R 3.0.2 compared to R 2 (I've checked on 2.14.0). Suppose I wish to calculate seasonal component for time series. In case of multivariate time series, I wish to process each column independently.
2012 May 10
1
stop calculation in a function
Hi dear R-users, I have a question about a function I'm trying to improve. How can I stop the function calculation at the last numeric value of my data? The problem is that the end of my data contains missing values (NAs). And the aim of my function is to compare the first numeric value with the next one (till the end). For the moment, It works well when my data doesn't contains any NAs
2011 Nov 02
1
kernapply.ts
I have a suggestion for kernapply for ts objects. When we choose the option circular=F, the returned series don't have the correct dates. The removed dates are all at the beginning instead of half at the beginning and half at the end. It is particularly useful when we need to smooth the series (or remove a trend using a filter) before estimating a model (like in macroeconomics) or simply
2006 Mar 24
3
bug in plot.acf (PR#8705)
(Moved from r-devel to r-bugs) On 3/24/2006 5:03 AM, Antonio, Fabio Di Narzo wrote: > Hi all. > There's a bug in plot.acf, when plotting acf for multivariate time series. > Here a reproducible example: > > X <- rnorm(1000) > Y <- -X + rnorm(1000, sd=0.6) > Z <- cbind(X,Y) > > In > acf(Z) > cross-correlation plot y-axis is limited to 0-1. But: >
2008 Mar 21
1
idea for GSoC: an R package for fitting Bayesian Hierarchical Models
Dear R developers, these days I'm working on some R code for fitting completely generic Bayesian Hierarchical Models in R, a la OpenBUGS and JAGS. A key feature of OpenBUGS and JAGS is that they automatically build an appropriate MCMC sampler from a generic model, specified as a directed acyclic graph (DAG). The spirit of my (would-be) implementation is instead more focused on experimentation
2005 Sep 21
3
ts.intersect bug?
This code gives an error: a <- ts(1:10, start=0, freq=10) b <- ts(1:10, start=1, freq=10) ts.intersect(a,b) This one works normally (and correctly): a <- ts(1:10, start=0) b <- ts(1:10, start=1) ts.intersect(a,b) Antonio, Fabio Di Narzo. P.S. How to switch off italian error messages to post on r-help? > version _ platform i386-pc-mingw32 arch i386 os
2018 May 15
0
Forecasting tutorial "Basic Forecasting"
Instead of Tsp = c(2016, 2018, 12) try Tsp = c(2016, 2018.25, 12) Hence, you can specify the object as structure(c(5973156.76, 5159011.2, 6695766.64, 6365359, 6495218.53, 7226302.39, 6835272.7, 7383501.57, 6962748.19, 7623278.72, 7274994.33, 7919421.8, 7360740.81, 7436693.35, 8545765.55, 7337269.76, 8180585.44, 8376635.05, 7758261.24, 10374641.22, 8000314.11, 9114958.9, 9805149.15,
2005 Jun 03
1
ts.intersect a multivariate and univariate ts
This seems like a FAQ, but I can't figure it out. I have a mv ts object: R > tsp(pg) [1] 1982 2003 1 R > dim(pg) [1] 22 12 and a univariate ts: R > tsp(rw) [1] 1690 1996 1 Yet, when I try to intersect them: R > tsp(ts.intersect(rw, pg)) [1] 1982 2176 1 the process goes awry. How to I get rw and pg to be one ts that runs from 1982 to 1996 and has 13 univariate time
2014 Apr 19
1
lag() not returning a time series object
Dear all, Before I file this as a bug, I wanted to check if I didn't miss something. The help page of lag() says that the function returns a time series object. It actually does return something that looks like a ts object (the attribute tsp is set). But when using a vector, the class "ts" is not added to the result: > avec <- 1:10 > lag(avec) [1] 1 2 3 4 5 6 7 8
2005 Dec 13
1
bug in geoR (?)
I've enconuntered this problem with the last cran version of geoR: > library(geoR) > day <- rep(1:2, each=5) > coords <- matrix(rep(runif(10),2), 10, 2) > data <- rnorm(10) > data[1] <- NA > as.geodata(cbind(coords, data, day), realisations=4) as.geodata: 1 points removed due to NA in the data Errore in as.geodata(cbind(coords, data, day), realisations = 4) :
2007 Dec 04
2
Wishlist: mention Vectorize in 'outer' man page (PR#10490)
Full_Name: Antonio, Fabio Di Narzo Version: 2.6.1 OS: linux Submission from: (NULL) (213.140.16.187) In 'outer' man page, there is no mention of the Vectorize function. Moreover, I think it isn't underlined enough that the FUN argument to 'outer' must be a vectorized function (doc speaks about a function which has to 'operate elementwise'). A cross-reference from
2010 Jul 03
2
Change the frequency of a ts?
I'm trying to convert a column of a table into a ts object. The data is monthly, so I want the ts frequency to be 12. I did this ... > filings.ts = as.ts(Filings.100K, frequency=12) > filings.ts Time Series: Start = 1 End = 311 Frequency = 1 [1] 246.9336 305.6789 ... ... > tsp(filings.ts) [1] 1 311 1 > tsp(filings.ts) <- c(1,311,12) Error in attr(x, "tsp")
2007 Nov 24
2
unexpected result from reshape
Hi all. I have unexpected reshape results on datasets with certain variable names. Here a reproducible example: d <- matrix(seq_len(7*7), 1, 7*7) vnames <- c('acc','ppeGross','CF','ROA','DeltaSales','invTA','DeltaRevDeltaRec') varying <- unlist(lapply(vnames, paste, 1:7, sep='.')) d <- data.frame(d) names(d) <- varying