hadley / r4ds

R for data science: a book
http://r4ds.hadley.nz
Other
4.59k stars 4.22k forks source link

Exercise 17.4.4 --> 4 actually works #1640

Open niloofar-dehdari-ebrahimi opened 8 months ago

niloofar-dehdari-ebrahimi commented 8 months ago

I am not an expert. But the question number 4 asks:

Why can’t (today() %--% (today() + years(1))) / months(1) work?

However, when I run it in the console, it returns: 12

davidrsch commented 6 months ago

This exercise came from previous version of the book, that most likely was build using lubridate 1.6.0 or a previous version, where doing this operation returned an error message. Maybe they can take it out next time they review it, @mine-cetinkaya-rundel ?