shm will not build vignettes if shm is not already installed

Issue #36 resolved
Jason Vander Heiden created an issue

If the shm package is not already installed (via a previous build), it will not build if vignette building is enabled. It will build without vignettes though.

The error is:

==> devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))

Updating shm documentation
Loading shm
Updating vignettes
Rebuilding Baseline-Vignette.Rmd
Quitting from lines 61-64 (Baseline-Vignette.Rmd) 
Error in e$fun(obj, substitute(ex), parent.frame(), e$data) : 
  worker initialization failed: there is no package called shm
Calls: suppressPackageStartupMessages ... eval -> eval -> collapseByClone -> %dopar% -> <Anonymous

Reproduced by deleting shm folder from R library and attempting to build with vignette building enabled.

Comments (9)

  1. ssnn

    And also something funny happens with plotBaselineDensity when building the Baseline-Vignette

    Updating shm documentation
    Loading shm
    Updating vignettes
    Rebuilding Baseline-Vignette.Rmd
    Quitting from lines 156-169 (Baseline-Vignette.Rmd) 
    Error in `[.data.frame`(base, names(rows)) : undefined columns selected
    Calls: suppressPackageStartupMessages ... facet_train_layout.grid -> layout_grid -> id -> vapply -> [ -> [.data.frame
    
  2. Jason Vander Heiden reporter

    I can't seem to replicate the Baseline-Vignette error... Maybe we can look at it together?

  3. ssnn

    The problem was actually at the beginning, in the collapseByClone function. I added to the vignette these lines, to see the results of each function:

    str(db)
    str(db_clone)
    str(db_obs)
    str(db_exp)
    str(baseline)
    str(baseline_one)
    

    This showed that db_clone$CLONAL_SEQUENCE was filled with a list of errors:

    ## $ CLONAL_SEQUENCE :List of 1359
    ## ..$ 1 : chr "could not find function \"calcClonalConsensus\""
    ## ..$ 2 : language eval(expr, envir, enclos)
    ## ..$ 3 : language eval(expr, envir, enclos)
    ## ..$ 4 : chr "could not find function \"calcClonalConsensus\""
    ## ..$ 5 : language eval(expr, envir, enclos)
    

    Adding 'calcClonalConsensus' to the clusterExport fixed the issue (95a8f64).

  4. Log in to comment