2 Comments
Guest *Joshua Goldberg* @ 2018-09-05 02:04:50 originally posted:
How much different is this than https://cran.r-project.org/web/packages/pacman/vignettes/Introduction_to_pacman.html?
Good question. I heard about pacman a few years ago (actually one of its authors was my classmate) but honestly I forgot it later. I just took a quick look at the documentation and realized that they inherited the NSE hack in library(), which is something I'm strongly against. Other than that, it seems pacman::p_load() and xfun::pkg_attach() do the same job.
BTW, the naming of library() and require() and the terminologies "attach" and "load" in base R are a complete mess, too. library() means attach, and requireNamespace() means load. I guess these are not super intuitive to beginners. Then pacman::p_load() means attach... A wonderful world :)
Originally posted on 2018-09-05 03:51:40
Guest *Joshua Goldberg* @ 2018-09-05 05:24:06 originally posted:
Interesting. That's cool you two were classmates. I understand your issues with NSE. I haven't run into any problems (to my knowledge). However, I constantly restart R when I get errors, so maybe I erase those occurences without knowing.
Guest *Miao YU* @ 2018-09-05 17:41:29 originally posted:
Is it possible to add supports for bioconductor and github repo? For example, xfun::pkg_attach(c('xcms','yihui/xaringan')) could attach and install packages if not exist. I think regular expression for '/' could be used to recognize the github repo.
One issue might be whether to update the github repo if new version/commit is available. An option for update = T might also be useful to force update or always use current version. However, this might need internet connection.
The reason is related to reproducible research. I noticed some papers report their results without telling the software version, which might cause misunderstanding that the algorithms in certain package never change. Also they might use an outdated version with known issues.
I can see the value, but that sounds like a lot more work to do, and I hope not to introduce (hard) dependencies like devtools to the xfun package. Supporting BioC is probably relatively easy, but I doubt if any users would actually use xfun::pkg_attach() at all...
Originally posted on 2018-09-05 21:04:50
Guest *Miao YU* @ 2018-09-06 14:19:43 originally posted:
Emmm, this is a good paradox: someone need to install extra package to avoid manually installing new packages. That's why the default setting is always the most annoying part for users to change :)
If only R core would consider this in base R... It is only a couple of lines of code anyway. On the other hand, I wish BioC never existed. Well, it could exist, but I wish it didn't have its own way of managing and installing R packages (thankfully we only have base R and BioC; unlike Python, which has more different ways to install packages).
Originally posted on 2018-09-06 16:44:40
Sign in to join the discussion
Sign in with GitHub