Step 1 shows how you can add and subtract days from a date to get the resulting date.
Step 2 shows how you can find the number of days between two dates through subtraction. The result is a difftime object that you can convert into a number if needed.
Step 3 shows the logical comparison of dates.
Step 4 shows two different ways to create sequences of dates. In one, you specify the from date, the to date, and the fixed interval by between the sequence elements as a string. In the other, you specify the from date, the interval, and the number of sequence elements you want. If you're using the latter approach, you have to name the arguments.
Step 5 shows how you can create sequences by specifying the intervals more flexibly. ...