build/update_package.R

setwd("build/")

#build up-to-date version of R API
api_update <- system("python2 deepblue_r.py")

if(!require(devtools)) stop("Package devtools needs to be installed.")

#check if the API was updated
if(api_update == 0)
{
    setwd("../")

    #update the documentation and check the package
    devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))
    check <- devtools::check()

    #if there are no errors install package
    if(!is.list(check)) {
        devtools::install(build_vignettes = TRUE)
    } else {
        print(check)
    }
}
MPIIComputationalEpigenetics/DeepBlueR documentation built on Aug. 11, 2021, 4:12 p.m.