When you take the difference between values of type Date or POSIXct, the result is not a Numeric type but a special data type called difftime.
The difftime type is specifically designed to represent the difference in dates/times when calculating durations.
Internally, difftime stores its values in seconds, but the displayed units can vary depending on the context. Sometimes the result is shown in days, and other times in seconds.
This behavior can change based on the content of the calculation, the size of the time difference, or R’s internal processing, and it is not always consistent.
Therefore, when calculating differences between dates or datetimes, it’s recommended to specify the appropriate unit in a later step via “Change Data Type”,
or use functions such as days_between for period calculations, which can be found under the “Period” section in the column header menu.