An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100501/b278f19f/attachment.pl>
select subset of data according to date range
2 messages · Carol Gao, Jim Lemon
On 05/01/2010 02:55 PM, Carol Gao wrote:
Dear R lists, ... Would anyone help me with setting data frames according to the date? ... my data looks like above, but definitely with more rows. Now I want a data frame with only "2008-12-02" in the first part of the 8th variable---Time.
Hi Carol, I would do something like this: my.data.frame[format(my.data.frame$Time,"%Y-%m-%d") == "2008-12-02",] although there may be a better way by extracting only the day from the Time field. Jim