similar to: Confused about behavior of an S4 object containing a ts object

Displaying 20 results from an estimated 8000 matches similar to: "Confused about behavior of an S4 object containing a ts object"

2008 Dec 18
0
Confused about behavior of an S4 object containing a ts object
I am trying to define an S4 class that contains a ts class object, a simple example is shown in the code below. However, when I try to create a new object of this class the tsp part is ignored, see below. Am I doing something wrong, or is this just a peril of mixing S3 and S4 objects? > setClass("tsExtended", representation = representation(description = "character"),
2008 Jul 10
0
Rmpi unkown input format error
I have just installed Rmpi on a Suse 9.1 linux cluster with openmpi-1.0.1. I am trying the example included below from the tutorial website. However, I keep getting the following error: > # Load the R MPI package if it is not already loaded. > if (!is.loaded("mpi_initialize")) { + library("Rmpi") + } > > # Spawn as many slaves as possible >
2008 Jul 16
1
Problem with mpi.close.Rslaves()
I am running R 2.7.0 on a Suse 9.1 linux cluster with a job scheduler dispatching jobs and openmpi-1.0.1. I have tried running one of the examples at http://ace.acadiau.ca/math/ACMMaC/Rmpi/examples.html in Rmpi and they seem to be working, except mpi.close.Rslaves() hangs. The slaves are closed, but the master doesn't finish its script. Below is the example script and the call to R. The job is
2010 May 17
1
format.data.frame containing S4 class with format method
Hi again, I must be misunderstanding something fundamental about how an S4 class stored in a data.frame can be persuaded to print according to a desired format. The help page says: format.data.frame formats the data frame column by column, applying the appropriate method of format for each column. Here is my class: > setClass("A",contains="character") [1] "A"
2009 Mar 19
2
How to set R_PROFILE conditional on batch or interactive mode
I am running R 2.8.1 on SUSE Linux. I would like to be able to set R_PROFILE to two different possibilities. One when R is called by R CMD BATCH and another any other time. Is this possible? Mark Lyman, Statistician Engineering Systems & Integration, ATK
2009 Jun 14
1
time function behavior for ts class objects
Hi all- I am trying to use the time function for ts class objects and do not understand the return value. I want to use it to set up a time trend in arima fits. It does not seem to return a correct linear sequence that matches the underlying time series. I am running: R version 2.8.1 (2008-12-22). For example: R> ## create a time series R> x <- rnorm(24) R> (xts <-
1997 Aug 25
0
R-alpha: ts problems
This message is in MIME format --_=XFMail.1.1.p0.Linux:970825095458:252=_ Content-Type: text/plain; charset=us-ascii Here is a patch which fixes some problems with time series functions. Some examples of what goes wrong... > x <- ts(rnorm(100),start=1,deltat=2) > start(x) Error in ts[1] : object is not subsettable > end(x) Error in ts[2] : object is not subsettable > y <-
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
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
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")
2005 Jan 31
2
changing the time base in a ts
I'm probably apporaching this all wrong to start but.... Suppose I have a monthly time series and I want to compute the mean of months 6,7, and 8. I want to plot the original time series and the seasonal time series, one above the other. When I do that as below the time series don't line up for reasons that are obvious. How can I change the base of the seasonal time series so I can make
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 =
1999 Aug 12
1
ts in R (again)
I have done a re-working of the time series code in base R and library ts that will appear in Friday's snapshot. I am sure at least one person will be dissatisfied, but I am convinced there are fewer errors than there were before (I found more than 20, as well as several documented features that did not exist.) The principles in the code are: tsp attributes can only go on vectors of length
2000 Apr 11
0
start.ts, end.ts (PR#513)
I'm having trouble with column-subsetting a multivariate time series. The underlying problem is with start(). R> x <- ts(matrix(rnorm(100), ncol=2)) R> y <- aggregate(x, ndeltat=2) R> y[,1] Error in ts(y, start = start(x), freq = frequency(x)) : invalid start R> start(y) [1] 2 1 R> frequency(y) [1] 0.5 The point where the error occurs in ts() is:
2012 Dec 12
1
Lost in S4 and S3 classes
Hi all, this is my first post in R devel? sorry if I lost some of the guidelines. Anyway this is my problem: Version: R version 2.15.2 (2012-10-26) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) I want to make an S4 class that use the output object of the function of nls.lm as a slot: setOldClass("nls.lm") setClass ( Class="TestClass",
2010 Apr 11
0
converting a ts object to an xts object
Dear R People: This is probably is very simple question. I have a monthly time series, ibm$ts , that I would like to convert to a quarterly series. I know that I could use "aggregate", but I am interested in the to.quarterly conversion, please. Here is my example: > str(ibm$ts) Time-Series [1:144] from 1998 to 2010: 43.7 46.3 46 51.4 52.2 ... > tsp(ibm$ts) [1] 1998.000 2009.917
2000 Apr 11
0
aggregate.ts (PR#514)
aggregate.ts does not behave in the same way as the equivalent method aggregate.rts in S-PLUS. In particular it - changes the start of the time series - tends to have a length which is 1 shorter For example: R> x <- ts(1:10) R> aggregate(x, nfreq=0.5, FUN=min) Time Series: Start = 2 End = 8 Frequency = 0.5 [1] 2 4 6 8 S> x <- rts(1:10) S> aggregate(x, nf=0.5, fun = min) [1]
1999 Jul 02
0
Bug in "[.ts" for multivariate ts {Problem with plot.ts, "[" (PR#217)
This message is in MIME format --_=XFMail.1.3.p0.Linux:990702182137:16900=_ Content-Type: text/plain; charset=us-ascii There was some discussion a while back on R-devel between Ross Ihaka, Paul Gilbert and myself about row subsetting in time series. I think the consensus was that "[.ts" should not try to coerce its result back to a time series object (which is underlying the problem
2008 Nov 26
1
How to create a string containing '\/' to be used with SED?
Hi guys, I've been struggling to find a solution to the following issue: I need to change strings in .ini files that are given in input to a program whose output is processed by R. The strings to be changed looks like: "instance = /home/TSPFiles/TSPLIB/berlin52.tsp" I normally use Sed for this kind of things. So, inside R I'd like to write something like: command <-
2017 Sep 02
1
Precision error in time index of ts objects
Thanks for the very detailed explanation. I did not create the series using structure(), that was the result of dump() on an intermediate object created within tsdisagg::ta(), which is where I found the error in the first place. ta() indeed manipulates .Tsp directly, rather than using ts. I guess this is a bug in tsdisagg then. Thanks! -- Andrea Altomani On Sat, Sep 2, 2017 at 12:31 AM