On Friday, R version 4.5 was released. If you are curious about what’s new and what’s changed, you might enjoy reading Russ Hyde’s blog post or R’s official list of changes. For me, the introduction of the use() function is the most interesting aspect of this update.| tomsing1.github.io
box::use imports one or more modules and/or packages, and makes them available in the calling environment.| klmr.me
In R there is now a function to load packages called use() (from version 4.4.0 onwards). There are of course already library() and require(), but I strongly recommend using use(), or at least understand why it exists and adjust how you use library() accordingly. | Erik Gahner Larsen
Attached: 1 image @josi@fosstodon.org base::use() is … not great. First off, the syntax is not ergonomic, and *syntax matters*. But secondly, and worse, it doesn’t actually work: because it’s just library() under the hood it still attaches things globally, and if you call it twice on the same package, the second call is ignored, so it doesn’t compose. The following code does not work, which is makes it useless. Of course I’m biased but base::use() really strikes me as a botched imit...| Mastodon