Description Usage Arguments Details Value Examples
This function calculates the time difference between two dates. It will return the time difference as a number in years rounded to two decimal places.
1 |
start_date |
The date you want to calculate the time difference from this date |
end_date |
The date you want to calculate the time difference to this date |
na.rm |
Remove NA values before calculation |
Inputs need to be in date format. You may use as.Date() or ymd() from the lubridate package to change the character or number into date format. If your inputs are not dates, the function will return an error message and tell you what format you have entered. So you can make adjustments accordingly.
A number in the unit of years rounded to two decimal places
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.