When I run the following code in R I get a strange note (it only appears the first time I run the code in a session):
> library(lubridate)
Attaching package: ‘lubridate’
The following object is masked from ‘package:base’:
date
Warning message:
package ‘lubridate’ was built under R version 3.3.2
> data.frame(i = interval(ymd(20140101), ymd(20160101)))$i %/% years(1)
Note: method with signature ‘Timespan#Timespan’ chosen for function ‘%/%’,
target signature ‘Interval#Period’.
"Interval#ANY", "ANY#Period" would also be valid
[1] 2
I am doubly confused:
- I am unclear as to what the alternative syntax is that it is recommending. A # is a comment in R, so presumably the hash is meant to mean something other than a hash, but what?
- Is it telling me I am doing something wrong? The note seems to suggest it is an FYI, but an FYI is an odd thing to be spat out of a function if there is no problem.