Re: [R] Time series data decomposition from by minute data

2024-10-06 Thread roslinazairimah zakaria
Peter, Thank you very much for your help. On Fri, Oct 4, 2024 at 9:19 PM Petr Pikal wrote: > Hallo > > you can extract POSIX object > > tv <- as.POSIXct(index(dt_train)) > > and use cut together with aggregate > cut(tv, "hour") > > aggregate(dt_train, list(cut(tv, "hour")), mean) > > 2014-10-06

Re: [R] Time series data decomposition from by minute data

2024-10-04 Thread Petr Pikal
Hallo you can extract POSIX object tv <- as.POSIXct(index(dt_train)) and use cut together with aggregate cut(tv, "hour") aggregate(dt_train, list(cut(tv, "hour")), mean) 2014-10-06 21:00:00 9.807692 2014-10-06 22:00:00 8.67 Cheers. Petr čt 3. 10. 2024 v 17:25 odesílatel roslinazairimah

Re: [R] Time Series Data Analysis

2014-03-03 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Kapil Shukla > Sent: Saturday, March 01, 2014 6:23 PM > To: r-help@r-project.org > Subject: [R] Time Series Data Analysis > > Hi All > > I am totally new to R so this question

Re: [R] Time Series data with data every half hour

2011-08-28 Thread Uwe Ligges
On 26.08.2011 17:43, Simmons, Ryan wrote: I am working with data from the USGS with data every 30 minutes from 4/27/2011 to 8/25/2011. I am having trouble with setting the frequency. My R script is below: shavers=read.csv("shavers.csv") names(shavers) [1] "agency_cd""site_no"

Re: [R] Time series data

2010-11-24 Thread Dennis Murphy
Hi: Perhaps something like this, assuming DATE is a Date object (try str(plcm60) to check) - if not, you need to use as.Date() to convert. jandays <- data.frame(DATE = seq(as.Date('2003-01-01'), by = 'days', length = 23)) merge(jandays, plcm60, by = 'DATE', all.x = TRUE) HTH, Dennis On Wed, Nov

Re: [R] Time series data with dropouts/gaps

2010-10-26 Thread Mike Marchywka
> From: ggrothendi...@gmail.com > Date: Tue, 26 Oct 2010 00:37:05 -0400 > To: flym...@gmail.com > CC: r-help@r-project.org > Subject: Re: [R] Time series data with dropouts/gaps > > On Tue, Oct 26, 2010 at 12:28 AM, Bob Cunningh

Re: [R] Time series data with dropouts/gaps

2010-10-26 Thread Bob Cunningham
On 10/25/2010 09:37 PM, Gabor Grothendieck wrote: On Tue, Oct 26, 2010 at 12:28 AM, Bob Cunningham wrote: I have time-series data from a pair of inexpensive self-logging 3-axis accelerometers (http://www.gcdataconcepts.com/xlr8r-1.html). Since I'm not sure of the vibration/shock spectrum I

Re: [R] Time series data with dropouts/gaps

2010-10-25 Thread Gabor Grothendieck
On Tue, Oct 26, 2010 at 12:28 AM, Bob Cunningham wrote: > I have time-series data from a pair of inexpensive self-logging 3-axis > accelerometers (http://www.gcdataconcepts.com/xlr8r-1.html).  Since I'm not > sure of the vibration/shock spectrum I'm measuring, for my initial sensor > characterizat

Re: [R] Time series data

2010-03-20 Thread David Winsemius
On Mar 20, 2010, at 1:17 PM, Gaathier Mahed wrote: Dear Sir/madam I am a new user to R. I have no background in coding or even scripting. It seems as if R would be the best tool in order to analyse large sets of data. I need to sum hourly readings for the day and then sum daily into monthly re

Re: [R] Time Series Data

2009-11-27 Thread chris carleton
ciated, Chris > CC: r-help@r-project.org > From: dwinsem...@comcast.net > To: w_chris_carle...@hotmail.com > Subject: Re: [R] Time Series Data > Date: Fri, 27 Nov 2009 10:10:36 -0500 > > > On Nov 27, 2009, at 9:55 AM, chris carleton wrote: > > > > > Hi Al

Re: [R] Time Series Data

2009-11-27 Thread David Winsemius
On Nov 27, 2009, at 9:55 AM, chris carleton wrote: Hi All, I'm trying to analyze some time series data and I have run into difficulty. I have decadal sun spot data and I want to separate the very regular periodic function from the trend and noise. I looked into using stl(), but the freq

Re: [R] Time Series Data

2009-10-19 Thread Gabor Grothendieck
If you convert your dates to an object d of Date class then as.numeric(d) will be the number of days since the Epoch. See R News 4/1. On Mon, Oct 19, 2009 at 2:20 PM, Marlin Keith Cox wrote: > Hi all and thanks in advance. > > I am regressing Time and Weight, and then predicting Weight at > diff

Re: [R] Time Series Data

2009-10-19 Thread stephen sefick
jullian day? On Mon, Oct 19, 2009 at 1:20 PM, Marlin Keith Cox wrote: > Hi all and thanks in advance. > > I am regressing Time and Weight, and then predicting Weight at > different Time.  The format of the Time data is day/month/year.  How > can I get R to use time series data such as this? > > K

Re: [R] time-series data and time-invariant missing values

2009-04-06 Thread Gabor Grothendieck
Check out na.locf in the zoo package. Here we fill in NAs going forward and just in case there were NAs right at the beginning we fill them in backward as well. library(zoo) x <- as.Date(c(NA, "2000-01-01", NA)) x2 <- na.locf(x, na.rm = FALSE) x2 <- na.locf(x2, fromLast = TRUE, na.rm = FALSE) gi