hadley / r4ds

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

Exercise 17.4.4 --> 4 actually works #1640

Open niloofar-dehdari-ebrahimi opened 5 months ago

niloofar-dehdari-ebrahimi commented 5 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 3 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 ?