Interaction with QCP code library at Bitbucket through the REST API
- Browse the code library
- Preview script and copy into new projects
- Check for updated versions of copied scripts
- Submit new scripts to the code library
Make sure tidyproject is running.
Install the bbcodelibrary package:
install.packages("devtools")
devtools::install_github("rgray1/bbcodelibrary")
library(bbcodelibrary)
Make a tidyproject:
make_project("path/to/directory")
Open the newly created Rstudio project with File -> Open Project. Warning: do not use setwd() to open tidyprojects.
You should see a new directory structure.
List the scripts available in the code library:
ls_scripts()
See more information about scripts in the library:
code_library(fields=c("Description", "Author"))
See information about specific scripts:
info_scripts("AUC.R", fields=c("Author", "Keywords"))
Preview a specific script:
preview_script("AUC.R")
Copy a script into your local tidyproject:
copy_script("AUC.R")
Check if a locally copied script has since been updated in the code library:
check_for_updates("AUC.R")
Submit a new/modified script to the code library:
submit_script("new_script.R")