![]() ![]() This error message meant that I needed to install fortran and Xcode on my mac. Installation of package ‘ape’ had non-zero exit status. Removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/ape’ ![]() Ld: warning: directory not found for option '-L/usr/local/gfortran/lib'Ĭlang: error: linker command failed with exit code 1 (use -v to see invocation)ĮRROR: compilation failed for package ‘ape’ When I tried to install the package ape I got a long error message the end of which is below ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0' The most robust way to install R packages on R devel is install.packages("package_name", type = "both")īecause it looks for either source or binary installations (some packages only have one). Packages that didn’t pass CHECK on R devel.Packages that depended on fortran/C/C++ (ex: ape).Using the wrong install.packages() type.While most CRAN packages should install with no trouble on R devel, but I ran into several problems: Use RSwitch to open RStudio and use it to select R devel.ġD) Getting packages installed on R devel.To access both R versions in RStudio and switch between them with ease I used the AMAZING program RSwitch. > tar -xvzf /path/to/ġC) Switching between R devel and R release Download devel and current release tarballs.I installed R devel on my mac (and reinstalled R release for good measure so I’d know they both go to the same location): Skip to 2) if your code passed CHECK on R devel 1B) Getting R devel on my mac Finding this out left me with the big question: “What do I do now?” I decided to download 4.0 and troubleshoot on my local computer because I coudln’t make sense of the CHECK results. I got my results back and learned that I had something like ~30 failed unit tests on 4.0 despite a perfect record on 3.6.2. This function tests the package on a windows server and emails you the results in ~15-30 minutes. I used devtools::check_win_devel() to test if my package passed the CHECK on R devel. Boy, was I wrong! 1A) How to know if you code passes CHECK on R devel Naive R programmer that I was, I assumed my code was robust and would therefore work on 3.5 (where it was developed), 3.6.2 (what I’m currently working with), and on 4.0. The development version of R is relevant to package development and submission because the package must pass the CHECK on R devel without ERRORs or WARNINGs. In January 2020, the release version of R was 3.6.2 and the development version of R was 4.0. R devel is the version of R currently under development. What follows are the issues that I ran into that these two resources didn’t address. My two favorites were R Packages by Hadley Wickham and a more compact version by Karl Broman. There are many resources that spell most of what you need to know to submit a package. ![]() Hopefully, this will help other package submission newbies! General resources: This post details the snags I ran into and their fixes. The whole process took many more hours than I had anticipated. I just submitted an R package, prewas, that I wrote with my colleagues Zena and Stephanie. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |