frenchcr
2009-Nov-14 18:21 UTC
[R] re move row if the column "date_abandoned" has a date in it
I want to go through a column in data called date_abandoned....data["date_abandoned"]....and remove all the rows that have numbers greater than 1,010,000. The dates are in the format 20091114 so i'm just going to treat them as numbers for clean up purposes. I know that i use subset but not sure how to proceed from there. -- View this message in context: http://old.nabble.com/remove-row-if-the-column-%22date_abandoned%22-has-a-date-in-it-tp26352457p26352457.html Sent from the R help mailing list archive at Nabble.com.
David Winsemius
2009-Nov-14 21:32 UTC
[R] re move row if the column "date_abandoned" has a date in it
On Nov 14, 2009, at 1:21 PM, frenchcr wrote:> > > I want to go through a column in data calledBad name for a data.frame. Fortunes, "dog" and all that.> date_abandoned....data["date_abandoned"]....and remove all the rows > that > have numbers greater than 1,010,000.Are you doing archeology? Given what you say next I wondered what range you were really asking for.> > The dates are in the format 20091114 so i'm just going to treat them > as > numbers for clean up purposes. > > > I know that i use subset but not sure how to proceed from there.subdata <- subset(data, date_abandoned > "01010000"() The problem with > "1010000" is that your specified minimum point had an insufficient number of "places" to be in YYYYMMDD format. -- David Winsemius, MD Heritage Laboratories West Hartford, CT