similar to: Creating date seq in data frame

Displaying 20 results from an estimated 10000 matches similar to: "Creating date seq in data frame"

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
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 Aug 01
1
aggregating a daily zoo object to a weekly zoo object
Dear R People: I'm trying to convert a daily zoo object to a weekly zoo object: xdate <- seq(as.Date("2002-01-01"),as.Date("2010-07-10"),by="day") library(zoo) length(xdate) xt <- zoo(rnorm(3113),order=xdate) xdat2 <- seq(index(xt)[1],index(xt)[3113],by="week") xt.w <- aggregate(xt,by=xdat2,mean) Error: length(time(x)) ==
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 <-
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
2015 Nov 06
0
Puzzled by eval
On 06/11/2015 7:36 AM, Therneau, Terry M., Ph.D. wrote: > 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
2006 May 21
3
Using ParseDate in for loop
Hi, I''m trying to use ParseDate within a for loop but I get this error: can''t dup NilClass Any suggestions for making this work? Thanks, -Jason
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
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
2006 Sep 13
3
unexpected result in glm (family=poisson) for data with an only zero response in one factor
Dear members, here is my trouble: My data consists of counts of trapped insects in different attractive traps. I usually use GLMs with a poisson error distribution to find out the differences between my traitments (and to look at other factor effects). But for some dataset where one traitment contains only zeros, GLM with poisson family fail to find any difference between this particular traitment
2012 Aug 28
3
date in plot, can't add regression line
Hello all, I have been using R for about 3 weeks and I am frustrated by a problem. I have read R in a nutshell, scoured the internet for help but I either am not understanding examples or am missing something completely basic. Here is the problem: I want to plot data that contains dates on the x axis. Then I want to fit a line to the data. I have been unable to do it. This is an example of
2009 Mar 20
4
how to make aggregation in R ?
Hi, I am trying to aggregate the sum of my test data.frame as follow: testDF <- data.frame(v1 = c("a", "a", "a", "a", "a", "b", "b", "b", "b", "b", "c", "c", "c", "c", "c", "d", "d", "d", "d",
2009 Jul 11
2
Date conversions
Hi all, I'm having a little bit of trouble with some date conversions and am hoping someone can help me out. Thanks in advance. OK, I have two sources of data that provide date info in a csv file differently. I've attached a small zipped file with two text files that illustrate both. (Is it ok to send attachments to this list? Not sure. It's very small.) I need to be able to
2012 Nov 10
4
help on date dataset
Hi everybody, I am beginer in R and I need your precious help. I want to create a small function in R as in sas to retrieve date. I have a file with data that import in R. DATE PAYS nb_pays.ILI. 1 24/04/2009 usa 0 2 24/04/2009 usa 0 3 24/04/2009 Mexique 0 4 24/04/2009
2013 Feb 14
3
Problems plotting and regression w.r.t. date data type on x axis
Hello, probably a newbie question, but i didnt find any information on plotting/regressing w.r.t. a date data type. My trials were unfruitful. Can anyone help ? Thanks in advance! Here is my interaction with R: > tabelle date number date2 1 2009-01-1 1673 2009-01-01 2 2009-12-1 2111 2009-12-01 3 2010-7-1 2487 2010-07-01 4 2013-2-1 4301 2013-02-01 > regression.punkte<-lm(tabelle$number
2003 Sep 08
2
How do I coerce numeric factor columns of data frame to vector?
I have just noticed that quite a few columns of a data frame that I am working on are numeric factors. For summary() purposes I want them to be vectors. I tried, for example > indx <- c(1:18,21:37,40,41) > i <- 0 > i <- i+1 > summary(as.vector(sflows1[indx[i]])) Length Class Mode min.pkt.sz 3000 factor numeric but this does not give the five-number
2005 Feb 24
2
Row median of Date class variables in a data frame
I am trying to calculate the median of each row of a data frame where the data frame consist of columns of class Date. Below are my test data and best attempt at using apply. I didn't see a solution via Google or the Baron search site. I'd be grateful for any suggestions or solutions. I'm using R 2.0.0 on Mac OS X. Thank you, Stephen Weigand ### Test data date1 <- c(1000,
2013 Apr 13
2
Comparison of Date format
Hi, ?In the example you provided, it looks like the dates in Date2 happens first.? So, I changed it a bit.? DataA<- read.table(text=" ID,Status,Date1,Date2 ??? ??? ?????? 1,A,3-Feb-01,15-May-01 ??? ??? 1,B,15-May-01,16-May-01 ??? ??? 1,A,16-May-01,3-Sep-01 ??? ??? ??? ??? ??? 1,B,3-Sep-01,13-Sep-01 ??? ??? ??? ??? ??? 1,C,13-Sep-01,26-Feb-04 ??? ??? ??? ??? ???
2012 May 12
1
Query regarding date as argument in functions - and about sqldf
Hi, I have a query about sqldf, and dates in general. I couldnt find much on the net or on the forums, hence I am here. Here is the issue: I want to write a function that accepts 3 arguments: date1, date2 and a dataframe, say 'df'. Within the function, I want to populate a temp dataframe which essentially contains the output of the query "select * from df where DATE between date1
2004 Aug 15
3
calibration/validation sets
Hi; Does anyone know how to create a calibration and validation set from a particular dataset? I have a dataframe with nearly 20,000 rows! and I would like to select (randomly) a subset from the original dataset (...I found how to do that) to use as calibration set. However, I don't know how to remove this "calibration" set from the original dataframe in order to get my