This is how my data looks like. Call it as 'df'. I am looking to count number of 'id' created for some specific date say 2017-11-04. Equally i would like to count number of 'passed' date and logic for the same date i.e, 2017-11-04. Please note that the date i mentioned (2017-11-04) is used as an example but i would like to aggregate for all the dates mentioned in 'date' column.
date            id      passed       logic
2017-11-04      101     2017-11-06   1
2017-11-04      102     2017-11-06   0
2017-11-04      103     2017-11-08   1
2017-11-05      104     NA           NA
PS-2: I have just started R and stack and not aware of basic syntax/rules, so if this question requires any edits, please put a comment. I shall make necessary changes which are required.
 
     
     
    