blabr
An R library for working in the BLAB
Installing
In R console:
remotes::install_github("BergelsonLab/blabr")This command will also update your version of blabr if it's already installed.
You might need to install remotes first if you haven't already.
Subprocess Issue:
If you are getting an issue with the subprocess package (which is now archived, and hence is not available from the main CRAN archive), run this command:
install.packages("https://cran.r-project.org/src/contrib/Archive/subprocess/subprocess_0.8.3.tar.gz", repos = NULL)This command simply installs the latest available version of the package before it was archived.
Usage
BLAB_DATA sync/load
Troubleshooting
I updated blabr but nothing has changed!
blabr but nothing has changed!Try restarting the R session.
OK, it helped but what was happening?
Only the first library/require call actually loads the library. All the consequent calls don't do anything. The reason for that is that a lot of code will try to load the same library many times. So, loading it again and again would (a) take a lot of time, (b) lead to unpredictable results if the installed version changed between the calls.
My script doesn't work anymore!
There have been a few changes to blabr that might make your scripts not work anymore. Below are the solutions for the two most common ones.
Note: it is recommended to use
renvfor managing an independent r library for each individual project. See Virtual environments for more details.
Error in xxx() : could not find function "xxx".
Most likely
xxxis a function from one of the tidyverse packages. Solution: google "tidyverse xxx", see what package it came from, load that package with the correspondinglibrary(yyy)call.Error: 'xxx' is not an exported object from 'namespace:blabr'
'xxx' is a blabr function/variable that is not accessible after attaching blabr (
library(blabr)) or using the double-colon (blabr::xxx). Solution: use triple colon operator -blabr:::xxxAND tell Zhenya to start exportingxxxin future versions.
Last updated