Selecting Specific Dates in R

后端 未结 2 1721
被撕碎了的回忆
被撕碎了的回忆 2021-01-28 05:49

I am wondering how to create a subset of data in R based on a list of dates, rather than by a date range.

For example, I have the following data set data wh

2条回答
  •  滥情空心
    2021-01-28 06:25

    The intersect() function (docs) will allow you to compare one data frame to another and return those records that are the same.

    To use, run the following:

    breezedays <- intersect(data$date,breezedate) # returns into breezedays all records that are shared between data$date and breezedate
    

提交回复
热议问题