search for: tsp

Displaying 20 results from an estimated 232 matches for "tsp".

Did you mean: esp
2013 Oct 23
2
Multivariate time series in R 3 vs R 2
...rsion 3, I get some frustrating results: > R.Version()$version.string [1] "R version 3.0.2 (2013-09-25)" > t <- ts(1:10, start = 100, frequency = 10) > > x <- t > y <- do.call(cbind, lapply(x, f)) > y Time Series: Start = 0 End = 0 Frequency = 1 structure(0, .Tsp = c(0, 0, 1), class = "ts") 0 0 structure(0, .Tsp = c(0, 0, 1), class = "ts") 0 0 structure(0, .Tsp = c(0, 0, 1), class = "ts") 0 0...
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 specif...
1999 Jul 15
1
[R] R: ts - objects (PR#228)
Marcus Eger <marcus.eger@physik.uni-marburg.de> writes: > > time(sqrt(arrts)) > Time Series: > Start = c(1, 1) > End = c(5, 1) > Frequency = 1 > [1] 1 2 3 4 5 Looks like a bug... > ---------------------------------------------------------------------------- > 2. (At least) boolean indexing with matrices does not seem to work > properly: >
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...
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"...
2006 Nov 23
1
dumping/loading objects with 'tsp' attribute
Dear all, I'm indirectly faced with the fact that setting the 'tsp' attribute of an object modifies its class definition: > class( structure(1:2, tsp=c(1,2,1), class=c("myts","ts")) ) [1] "ts" "myts" In general, this is of really little (ok, I admit: totally no) interest for me because 'myts' class is added...
2011 Nov 02
1
kernapply.ts
...or(x), k, circular=circular) ts (y, end=end(x), frequency=frequency(x)) } else y <- apply(x, MARGIN=2L, FUN=kernapply, k, circular=circular) if(circular) ts (y, end=end(x), frequency=frequency(x)) else { y <- as.ts(y) t1 <- tsp(x)[1]+(length(k[[1]])-1)/tsp(x)[3] t2 <- tsp(x)[2]-(length(k[[1]])-1)/tsp(x)[3] tsp(y) <- c(t1,t2,tsp(x)[3]) return(y) } } -- *Pierre Chaussé* Assistant Professor Department of Economics University of Waterloo [[alternative HTML version deleted]]
2012 Aug 03
4
How to concatenate a several rows according with a column ?
...E001234 TSB IP234 like_domain 3 E001234 TSC IP234 like_domain 4 E001234 TSD IP234 like_domain 5 E001235 TSA IP235 two_domain 6 E001235 TSD IP235 two_domain 7 E001235 TSS IP235 two_domain 8 E001236 TSP IP236 like_domain 9 E001236 TST IP236 like_domain 10 E001237 TSV IP237 simple_domain I want my table in this way >table_new a b c d 1 E001234 TSA, TSB, TSC, TSD IP234 li...
2018 May 15
3
Forecasting tutorial "Basic Forecasting"
...270.48 , -1596204.33, -1836731.26, -1310376.81, -1337718.49, -1492220.98, -1421801.16) ,.Dim = c(28L, 3L) ,.Dimnames = list(NULL, c("TotalNetRev","TotalRevAdjusted" ,"TotalRevCancelled")) ,.Tsp = c(2016, 2018, 12) , class = c("mts", "ts", "matrix")) Error in attributes(.Data) <- c(attributes(.Data), attrib) : invalid time series parameters specified I think the error may be due to 28 months of data, complete 2016 & 2017 but only...
2010 May 30
1
solve_TSP ignores control data, or I'm reading the help doc incorrectly.
I read the documentation below to mean that: solve_TSP( tsp_input, '2-opt', rep=99 ) will use the 2-opt method on the tsp_input variable 99 times. Catch: I get an "unused input" error. Q: Am I reading the docs (Item 1, below) correctly or is this a problem with solve_TSP ignoring its inputs (Item 2, below). Item 1: solve...
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 univa...
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: -----------------------------------------------------------------...
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.4...
1997 Aug 25
0
R-alpha: ts problems
...nctions. 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 <- ts(matrix(rnorm(100),ncol=2)) > window(y,1,10) Error in [.ts(x, (trunc((start - xtsp[1]) * freq + 1.5):trunc((end - xtsp[1]) * : unused argument to function The first two bugs propagate quite widely. You can't even print x. Unlike S-PLUS, R does not allow you to take row subsets of a time series object without unclassing it (Of course there is the window function, but you ca...
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 9 10 attr(,"tsp") [1] 0 9 1 > as.ts(lag(avec)) Time Series: Start = 0 End = 9 Frequency = 1 [1] 1 2 3 4 5 6 7 8 9 10 >...
2011 Mar 17
3
date conversion
Dear R People: I have a monthly time series which runs from January 1998 to December 2010. When I use tsp I get the following: > tsp(ibm$ts) [1] 1998.000 2010.917 12.000 Is there an easy way to convert this to a seq.Date object, please? I would like to have something to the effect of 1998/01/01 .... 2010/12/01 Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mat...
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") <- value : invalid time series parameters specified What am I doing wrong here? I can't seem to be able to change the frequency from 1 to 12. Thanks! Nick Frazier [[alternative HTML v...
2019 Nov 19
2
Global number rewriting rules affecting ALL headers?
Hi List One more Problem I stumbled upon. Using Asterisk in a TSP environement. Incomming IC Calls are e164 and have a NPRN (Routing Number) prefixed. Example: +4198055615995555 +41 country prefix 98055 Routing Prefix 615995555 effective phone number Calls routed to Customers need to be put in the 'local' format. 0615995555 This is also the format o...
2008 Mar 30
2
data(lh) time serie parameters
Dear all, I'm confused by the time serie parameters in data(lh) : sueoka:~ lobry$ R --vanilla --quiet > tsp(lh) [1] 1 48 1 because documentation says: QUOTE A regular time series giving the luteinizing hormone in blood samples at 10 mins intervals from a human female, 48 samples. UNQUOTE So that I would expect the time serie to end at 480 minutes or 8 hours. Shouldn't we have something like: &g...
2005 Jan 31
2
changing the time base in a ts
...ot to line up with cycle 6 of the first plot. Thanks. dat <- ts(rnorm(12*20), start = c(1980,1), frequency = 12) plot(dat) dat.sub <- dat dat.sub[cycle(dat.sub) < 6] <- NA dat.sub[cycle(dat.sub) > 8] <- NA dat.sub <- aggregate(dat.sub, nfrequency = 1, FUN = mean, na.rm = T) tsp(dat) tsp(dat.sub) par(mfrow = c(2, 1)) plot(dat) plot(dat.sub, type = "b")