| ddiff | R Documentation | 
Date difference (or difference in days).
ddiff(x, y, unit = "day", do.date.convert = TRUE, do.numeric = TRUE)
| x | Vector of starting dates or items that can be converted to dates by todate. | 
| y | Vector of ending dates or items that can be converted to dates by todate. | 
| unit | Character indicating what to use as the unit of difference. Values like d, y, m or day, year, month will work. Takes just the first letter in lower-case to determine unit. | 
| do.date.convert | Convert to dates before running the difference. If you know your columns are already dates, setting to FALSE will make your code run faster. | 
| do.numeric | Convert the output to a number instead of a date difference object. | 
Vector of differences.
ddiff( lubridate::mdy( '1/1/2018' ), lubridate::mdy( '3/4/2018' ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.