similar to: Time format

Displaying 20 results from an estimated 20000 matches similar to: "Time format"

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 Nov 15
2
Subtracting timeseries objects
Sorry to keep posting but I want to do this right and I'm hoping for some pointers I now have two time series objects which I need to subtract. Unfortunatly the two series dont have the same sample rates. When I try to subtract them avgSub<-avg1-avg2 The time series object is clever enough to object. So I guess I need to write a function for subtraction of the time series objects which
2011 Jun 16
2
Polygon question
Hi all, I have the following script which fills the values which are less than the mean of a given timeseries. If you look closely, the colored regions are "out of line". Any suggestions how I can rectify this? Thanks Muhammad # ----- #rm(list=ls()) x <- abs(rnorm(100)) tt <- 1:100 m <- mean(x) w <- which(x>=m) x1 <- x ; x2 <- x ; x3 <- x x1[w] <- m
2017 Jul 30
4
Kalman filter for a time series
I found an example at http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html shown below. But it seems the structSSM function has been removed from KFAS library so it won't run. Does anyone know how to fix the code so that it runs? library(KFAS) library(tseries) library(timeSeries) library(zoo) library(quantmod) getDailyPrices = function( tickerSym, startDate, endDate ) {
2008 Jan 29
1
coherency and phase plots
I am having a hard time interpreting the phase and coherency plots. x is two timeseries that occur at the same time i.e. a b 1 11.2 12.3 16 11.3 12.4 31 11.4 12.5 46 11.5 12.6 ...etc even though my example is does not show this they are oscillating at more or less the same frequency just shifted by t=x (imagine two sine waves offset with the 2nd sine
2009 Jul 25
3
how to smooth timeseries without the lagging?
Hi all, If I use a moving average, it will smooth the choppy time series, but it will lead to lagging... How do I smooth timeseries without the lagging effect? Thanks!
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 just after assigning the
2005 Apr 27
3
Time series indexes
I tried to assign values to specific elements of a time series and got in trouble. The code below should be almost self-explanatory. I wanted to assign 0 to the first element of x, but instead I assigned zero to the second element of x, which is not what I wanted. Is there a function that will allow me to do this without going into index arithmetic (which would be prone to errors)? FS >
2003 Oct 22
2
High frequency time-series
Having to collect hourly electricity loads and quarter-of-an-hour electricity production data for some years I think that the tidiest way of doing it is to resort to ts but I don't know how to define such a frequency starting from a set date. Leafing through r-help mail archives I've found this *ALMOST* satisfactory message: ==========================================================
2017 Jul 30
0
Kalman filter for a time series
> structSSM Is no longer part of KFAS. All you needed to do was: library(KFAS) ?KFAS and you would have seen that if you went to the index. A structural state space model is now built up from its components, much like in LM. Look at; ?SSModel -Roy > On Jul 29, 2017, at 9:26 PM, Staff <rbertematti at gmail.com> wrote: > > I found an example at >
2007 Jun 03
2
Subscript in axis label
Dear R help list members, I am experiencing difficulty in trying to generate a subscript '2' in an axis label. Although I can get the '2' into a subscript using expression(), R then forces me to leave at least one space between the '2' and the following character. My label is supposed to read 'N2O concentration (ppm)', and the space between the '2' and
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
2005 Feb 09
1
Plotting: Plot several axis at right hand side of the plot
Hi all, I created a graph by plotting 4 time series on top of each other but don't know how to add extra axes on the right hand side of the plot (or leftside). For the first two time series it axis are plotted but the last two time series don't have and axis. How can these be added and where? e.g. par(mfrow=c(1,1)) plot(timeserie1) par(new=T) plot(timeserie2,
2010 Apr 08
2
xts off by one confusion or error
Hullo I may have missed something blindingly obvious here. I'm using xts to handle some timeseries data. I've got daily measurements for 100 years. If I try to reduce the error rate by taking means of each month, I'm getting what at first sight appears to be conflicting information. Here's a small subset to show the problem: A small set of data: > vv x
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:
2008 Sep 09
4
Help with 'spectrum'
For the command 'spectrum' I read: The spectrum here is defined with scaling 1/frequency(x), following S-PLUS. This makes the spectral density a density over the range (-frequency(x)/2, +frequency(x)/2], whereas a more common scaling is 2? and range (-0.5, 0.5] (e.g., Bloomfield) or 1 and range (-?, ?]. Forgive my ignorance but I am having a hard time interpreting this. Does this mean
2010 Jul 01
2
calculation on series with different time-steps
Hello, I have two series, one with stream stage measurements every 5 minutes, and the other with barometric pressure measurements every hour. I want to subtract each barometric pressure measurement from the 12 stage measurements closest in time to it (6 stage measurements on either side of the hour). I want to do something like the following, but I don't know the syntax. "If the
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
2007 Dec 03
1
Plotting monthly timeseries with an x-axis in "time format"
I have the following timeseries "tab" ===================================== > str(tab) mts [1:23, 1:2] 79.5 89.1 84.9 75.7 72.8 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:2] "Ipex...I" "Omel...E" - attr(*, "tsp")= num [1:3] 2006 2008 12 - attr(*, "class")= chr [1:2] "mts" "ts" > tab
2008 Dec 03
1
how to handle irregularly spaced data as timeseries
I have a set of modeled climate data recorded at irregular intervals. The format of the data is such that there are monthly measurements for the years 2000, 2020, 2050, 2080, etc. Therefore I have 12 regular records, a skip of some number of years, then 12 more monthly records, another skip, and so on.... I created a dataframe from .txt with the read.table() command. For starters I need