similar to: Selecting data based on the range of dates

Displaying 20 results from an estimated 30000 matches similar to: "Selecting data based on the range of dates"

2010 Aug 19
1
zoo. window
Hi, I have a dataset including monthly date from 1971-01-01 to 2009-01-01. The dates are character variables. I want to select the subsample from my original data, so I use mydata3<-window(mydata,start="1972-02-01",end="2005-02-01"), or mydata3<-window(mydata, start=as.date("1972-02-01"),end=as.date("2005-02-01")) or mydata3<-window(mydata,
2006 Feb 20
3
Boxplot Help for Neophyte
R helpers I am getting to grips with R but came across a small problem today that I could not fix by myself. I have 3 text files, each with a single column of data. I read them in using: myData1<-scan("C:/Program Files/R/myData1.txt") myData2<-scan("C:/Program Files/R/myData2.txt") myData3<-scan("C:/Program Files/R/myData3.txt") I wanted to produce a
2011 Mar 10
2
Selecting ranges of dates from a dataframe
Hello list! I have a data.frame which looks like this: > serv datum op.read op.write read write 1 2011-01-29 10:00:00 0 0 0 0 2 2011-01-29 10:00:01 0 0 0 0 3 2011-01-29 10:00:02 0 0 0 0 4 2011-01-29 10:00:03 0 4 0 647168 5 2011-01-29 10:00:04 0 0 0 0 6 2011-01-29
2009 Sep 21
3
compute differences
Hi, I have a problem. I have a data frame looking like: ID val A? .3 B? 1.2 C? 3.4 D? 2.2 E? 2.0 I need to CREATE the following TABLE: CASE?? DIFF A-A??? 0 A-B??? -0.9 A-C??? -3.1 A-D??? -1.9 A-E??? -1.7 B-A??? ... B-B??? ... B-C B-D B-E C-A C-B C-C C-D C-E D-A D-B D-C D-D D-E E-A E-B E-C E-D E-E WHERE CASE IS THE COUPLE OF ELEMENTS CONSIDEREDM AND DIFF IS THE computed DIFFERENCE between
2011 Feb 25
1
speed up process
Dear users, I have a double for loop that does exactly what I want, but is quite slow. It is not so much with this simplified example, but IRL it is slow. Can anyone help me improve it? The data and code for foo_reg() are available at the end of the email; I preferred going directly into the problematic part. Here is the code (I tried to simplify it but I cannot do it too much or else it
2012 May 19
2
Subset based on a date range
Hello, Can someone help me on how to make a subset of my dataframe using two dates. This is what I have tried, but no data is being excluded in the new frame. six_months<-subset(Two_years, vdate>2011-01-01|vdate<2011-07-01) or all data is excluded six_months<-subset(Two_years, vdate>2011-01-01&vdate<2011-07-01) -- View this message in context:
2006 Oct 08
2
Select range of dates
Hello, This is likely fairly silly question, and I apologize to whomever takes the time to respond. I am a relatively new user of R, on Windows XP, version 2.3.1. Say I have a data table that looks like the following: x Date Location Amount Blue Green 1 01/01/2001 Central 1817 TRUE FALSE 2 01/02/2001 Central 20358 FALSE TRUE 3 05/08/2001 Central 16245 FALSE TRUE 4
2007 Dec 11
0
[Kurt.Hornik@wu-wien.ac.at: Re: range( <dates>, na.rm = (PR#10509)
Kurt.Hornik at wu-wien.ac.at wrote: > ------- Start of forwarded message ------- > Date: Tue, 13 Nov 2007 21:44:57 +0100 > To: Steve Mongin <sjm at ccbr.umn.edu> > Cc: cran at r-project.org > Subject: Re: range( <dates>, na.rm =3D TRUE ) > In-Reply-To: <200711062044.OAA14064 at minnow.ccbr.umn.edu> > Reply-To: Kurt.Hornik at wu-wien.ac.at > From: Kurt
2014 Nov 10
2
range () does not remove NA's with complete.cases() for dates (dplyr/mutate)
Hello, The range() with complete.cases() removes NA's for the date variables that are read from a data frame. However, the issue is that the same function does not remove NA's for the other date variable that is created using the dplyr/mutate(). The console and the reproducible example are given below. Any advice how to resolve this issue would be appreciated. Thanks, Pradip Muhuri
2017 Jun 21
0
selecting dataframe columns based on substring of col name(s)
> On Jun 21, 2017, at 9:11 AM, Evan Cooch <evan.cooch at gmail.com> wrote: > > Suppose I have the following sort of dataframe, where each column name has a common structure: prefix, followed by a number (for this example, col1, col2, col3 and col4): > > d = data.frame( col1=runif(10), col2=runif(10), col3=runif(10),col4=runif(10)) > > What I haven't been able to
2008 Jul 21
1
Subsetting data by date
Hi all, Firstly I appologise if this question has been answered previously, however searching of the archives and the internet generally has not yielded any results. I am looking in to the effects of summer weather conditions (temperature, humidity etc), on the incidences of a breathing disorder brought on through smoking (COPD). I am fairly new to R and completely new to the idea of
2007 Dec 11
1
[Kurt.Hornik@wu-wien.ac.at: Re: range( <dates>, na.rm = TRUE )] (PR#10508)
------- Start of forwarded message ------- Date: Tue, 13 Nov 2007 21:44:57 +0100 To: Steve Mongin <sjm at ccbr.umn.edu> Cc: cran at r-project.org Subject: Re: range( <dates>, na.rm = TRUE ) In-Reply-To: <200711062044.OAA14064 at minnow.ccbr.umn.edu> Reply-To: Kurt.Hornik at wu-wien.ac.at From: Kurt Hornik <Kurt.Hornik at wu-wien.ac.at> X-AntiVirus: checked by AntiVir
2018 Sep 05
2
Migration samba 3 to 4
Hello, I'm testing with this link but i'have the same error. # samba-tool domain classicupgrade --dbdir=/root/samba3/dbdir/ --realm=dom.hilaire --dns-backend=SAMBA_INTERNAL /root/samba3/etc/smb.conf # ll /root/samba3/ total 8 drwxr-xr-x 2 root root 4096 sept.  5 11:23 dbdir drwxr-xr-x 2 root root 4096 sept.  5 11:21 etc # ll /root/samba3/dbdir/ total 11900 -rw------- 1 root root   
2011 Sep 20
1
Specifying Start/End Dates for X-axis Range in plot()/xyplot()
I'm having difficulty finding the syntax to use to specify the beginning and ending dates for the x-axis while plotting a zoo object. I thought that I had seen a message on this list that used start=as.Date("...") end=as.Date("..."), but I cannot find that message. I've tried ?plot, ?plotxy, ?plot.zoo, and Sarkar's lattice book. I am trying to plot the time
2006 Sep 18
1
ISO8601 week-of-year to date
Hi, are there any way to convert ISO8601 weeks to gregorian dates? Something like coverttodate(year=2006, week=38, day=1) # Sept 18, 2006 Thanks in advance, Ott
2008 Jan 16
4
How to test if one range of dates overlaps another?
Hi all, I have a situation with a recurring billing application where I need to test if one range of dates "overlaps" another range of dates. Does anyone know a rails find or mysql select statement that will test for this? Here are the details: * Recurringcharge items have a start_date and an end_date that represent the period of time that the charges should occur. * Statement items
2011 Jul 22
1
Summing values by weekday and weekend - based on daily dates
Hi, all Here I created a data frame like mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day") myvalues<-runif(43,0,1) myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day value 1 2010-05-29 Saturday 0.14576143 2 2010-05-30 Sunday 0.37669604 3 2010-05-31 Monday 0.74813943 4 2010-06-01 Tuesday
2011 Mar 30
2
summing values by week - based on daily dates - but with some dates missing
Dear everybody, I have the following challenge. I have a data set with 2 subgroups, dates (days), and corresponding values (see example code below). Within each subgroup: I need to aggregate (sum) the values by week - for weeks that start on a Monday (for example, 2008-12-29 was a Monday). I find it difficult because I have missing dates in my data - so that sometimes I don't even have the
2009 Jun 26
3
to raise in a loop more than 1
I would raise x,y and z in a loop but I won't raise of 1. I tried this but it doesn't work mydata=matrix(nrow=1500,ncol=3) i=1 for(x in 0:10){ for(y in 0:20){ for(z in 0:10){ mydata[i,]=c(x,y,z) i=i+1 z=z+2} y=y+4} x=x+2} And I would have something like that x y z 0 0 0 0 0 2 0 0 4 0 0 6 0 0 8 0 0 10 0 4 0 0 4 2 ... Could anybody help me? I
2007 Aug 10
7
Help wit matrices
Hello all, I am working with a 1000x1000 matrix, and I would like to return a 1000x1000 matrix that tells me which value in the matrix is greater than a theshold value (1 or 0 indicator). i have tried mat2<-as.matrix(as.numeric(mat1>0.25)) but that returns a 1:100000 matrix. I have also tried for loops, but they are grossly inefficient. THanks for all your help in advance. Lanre