My dataframe 'y'
steps date interval
<dbl> <date> <int>
1 0 2012-10-01 0
2 0 2012-10-01 5
3 0 2012-10-01 10
4 0 2012-10-01 15
5 0 2012-10-01 20
6 0 2012-10-01 25
7 0 2012-10-01 30
8 0 2012-10-01 35
9 0 2012-10-01 40
10 0 2012-10-01 45
# ... with 17,558 more rows
I want to extract rows where month==11 & day==1 with columns of "steps" and "interval" only.
NOT WORKING CODE
y[month(y$date)==11 & day(y$date)==1,c(y$steps,y$interval)]
I also tried using a combination of using the first select and then filter, but while we select() the specified columns "steps" and "interval", I am unable to apply condition in Filter() as it depends on removed column "date".
Can someone explain to me an easy way of resolving this issue?