similar to: aggregating a daily zoo object to a weekly zoo object

Displaying 20 results from an estimated 4000 matches similar to: "aggregating a daily zoo object to a weekly zoo object"

2010 Jul 29
2
multiple graphics windows open
Dear R People: Now I have a function with 3 graphics windows. I'd like for them all to be visible. However, the first window goes blank. Here is the basic setup. The first plot is the entire series. The user selects two points, which in turns generates a subset plot and an EWMA subset plot. Finally, if things worked right, the user should be able to click on "Tile Vertically"
2010 Jul 29
1
multiple graphics windows open with sessionInfo
Dear R People: Hello again. I'm trying to have 3 graphics windows visible simultaneously. I set up a zoo series. Then I plot the original series. I use the locator function to select 2 values from the original series, which generates a subset of the original series. Next, I plot the subset. The last step is to produce an EWMA chart from the subset series. Fair enough. I've tried
2009 Mar 25
1
Creating date seq in data frame
Hi, I have the following type of data: myData <- data.frame(x = 1:5, y = letters[1:5], xDate = seq(as.Date("2001/2/1"), as.Date("2005/2/1"), by="year") ) > myData x y xDate 1 a 2001-02-01 2 b 2002-02-01 3 c 2003-02-01 4 d 2004-02-01 5 e 2005-02-01 What I need is a new column, say xDate2, that for each xDate (or for each unique combination of
2007 Jun 13
5
Confusion with sapply
Hi, I have some confusion in applying a function over a column. Here's my function. I just need to shift non-March month-ends to March month-ends. Initially I tried seq.dates, but one cannot give a negative increment (decrement) here. return(as.Date(seq.dates(format(xdate,"%m/%d/%Y"),by="months",len=4)[4]) ) Hence this simple function: > mydate <-
2007 Jan 26
2
how to create daily / weekly ts object?
Dear All, Monthly and Quarterly ts obj. is easy to understand. But I couldn't find an example in R manual how to create daily or weekly ts object. Could you please shed some light on it? I really appreciate it.
2008 Jun 07
2
Using lm with a matrix?
I'm trying to do a linear regression between the columns of matrices. In example below I want to regress column 1 of matrix xdat with column1 of ydat and do a separate regression between the column 2s of each matrix. But the output I get seems to give correct slopes but incorrect intercepts and another set of slopes with value NA. How do I do this correctly? I'm after the slope and
2007 Aug 02
1
Using 'diff' on zoo vs zooreg classes (possible bug?)
Hello, Can anyone explain the following behaviour? To me it seems a bug, but maybe it is intentional. It seems that a diff on a zooreg class that is not _strictly_ regular only considers those entries that are 'deltat' apart. In the following, diff on the zooreg class only returns values where the index was one second apart. The example replicates by dev code, but I've also tested
2015 Nov 06
4
Puzzled by eval
I am currently puzzled by a seach path behavior. I have a library of a dozen routines getlabs(), getssn(), getecg(), ... that interface to local repositories and pull back patient information. All have a the first 6 arguments in common, and immediately call a second routine to do initial processing of these 6. The functions "joe" and "fred" below capture the relevant
2009 Nov 19
2
Problem with zoo and BootPR packages
Hi, I'm trying to plot the forecasts I generated using the Plot.Fore function of the BootPR package. But I got an error from zoo: My data: Time Series: Start = 1 End = 18 Frequency = 1 [1] 38731 38628 39117 92809 71984 31226 58613 72360 107956 92066 [11] 95208 99098 95848 120383 110717 105680 98469 101916 Script: y1<-ts(y1);
2014 Jul 04
1
DESCRIPTION.in file causes R CMD check to fail?
hi. i'm building a package using autotools. to propagate the package version number from configure.ac to DESCRIPTION, i'm using a DESCRIPTION.in file. both of these files are "shar"'d below. i need to distribute the DESCRIPTION.in file, as ./configure will need it. but, "R CMD check" wants to look at DESCRIPTION, so i've let that also come into the package
2002 Apr 11
6
extract week from date
Hello R-users, Does anyone know how obtain the week of a date? (in SPPS the instruction is "xdate.week") Thanks, Juan Ramon -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the
2010 Jun 08
2
setting up zoo objects from a data frame
Dear R People: I have the following data frame: > str(dog.df) 'data.frame': 7 obs. of 2 variables: $ V1: Factor w/ 3 levels "1/1/2000","1/2/2000",..: 1 1 1 2 2 3 3 $ V2: Factor w/ 3 levels "cat","dog","tree": 2 1 3 1 3 2 3 > dog.df V1 V2 1 1/1/2000 dog 2 1/1/2000 cat 3 1/1/2000 tree 4 1/2/2000 cat 5 1/2/2000 tree 6
2011 Sep 12
5
Hourly data with zoo
I have date data as a numeric and hourly data in 0 to 2300 hours in a dataframe. d <- rep(20110101,24) h <- seq(from = 0, to = 2300, by = 100) df <- data.frame(LST_DATE = d, LST_TIME = h, data = rnorm(24, 0, 1)) S <- chron(dates. = as.character(df$LST_DATE), times. = paste(as.character(df$LST_TIME/100), ":0:0", sep = ""), format =
2011 Apr 06
2
A zoo related question
Dear all, please consider my following workbook: library(zoo) lis1 <- vector('list', length = 2) lis2 <- vector('list', length = 2) lis1[[1]] <- zooreg(rnorm(20), start = as.Date("2010-01-01"), frequency = 1) lis1[[2]] <- zooreg(rnorm(20), start = as.yearmon("2010-01-01"), frequency = 12) lis2[[1]] <- matrix(1:40, 20) lis2[[2]] <-
2005 Aug 27
2
zoo, zooreg, & ISOdatetime
I create a zooreg object that runs from Jan-1-2002 0:00 to Jun-1-2005 0:00... regts.start = ISOdatetime(2002, 1, 1, hour=0, min=0, sec=0, tz="") regts.end = ISOdatetime(2005, 6, 1, hour=0, min=0, sec=0, tz="") regts.zoo <- zooreg( NA, regts.start, regts.end, deltat=3600 ) Upon inspection: > regts.zoo[1:3] 2002-01-01 00:00:00 2002-01-01 01:00:00 2002-01-01 02:00:00
2012 Dec 04
1
Periodicity of Weekly Zoo
Hi List, I have weekly sales observations for several products drawn via ODBC. Source data is available at https://www.dropbox.com/s/78vxae5ic8tnutf/asr.csv. This is retail sales data, so will contain seasonality and trend information. I expect to see 52 or 53 observations per year, each observation occuring on the same day of the week (Saturday). Ultimately I'm looking to feed these series
2010 Apr 18
4
confused with yearmon, xts and maybe zoo
R-listers, I am using xts with a yearmon index, but am getting some inconsistent results with the date index when i drop observations (for example by using na.omit). The issue is illustrated in the example below. If I start with a monthly zooreg series starting in 2009, yearmon converts this to "Dec-2008". Not such a worry for my example, but strange. Having converted to xts, i drop
2008 Apr 03
1
rtc issue
Hi all, I have installed centos 5.1 x86_64. 2.6.18-53.1.14.el5 Everything seems to be working fine except that the rtc module is not working. cat /proc/interrupts shows: CPU0 CPU1 0: 129 0 XT-PIC-XT timer 1: 330797 0 XT-PIC-XT i8042 2: 0 0 XT-PIC-XT cascade 3: 4 0
2009 Jun 16
2
tdm loosing interrupts and latency
Hi I have come across a problem, with my tdp410 and soekris board (basically pc on a chip amd geode cpu). I am using the box as a firewall/asterisk box. The problem occurs when I drop ppp and I get dead loop dectiotn going, I seem to lose interrupts and get lots of messages in syslog from wctdm24xx saying missed interrupt increasing latency its out lined here
2010 Nov 23
2
Plot two zoo object with different indexes
Dear R community, I have the following two zoo objects: MONTHLY CPI > plot(z) > par("usr") [1] 1977.76333 2011.15333 70.39856 227.03744 > z=zooreg(cpius$Value,as.yearmon("1979-11"),frequency=12) > str(z) ?zooreg? series from Nov 1979 to Oct 2010 Data: num [1:372] 76.2 77 77.8 78.5 79.5 80.3 81.1 82 82 82.6 ... Index: Class 'yearmon' num [1:372]