New diversity functions

Issue #75 resolved
ssnn created an issue

No description provided.

Comments (9)

  1. Jason Vander Heiden

    Errors to fix before merging the diversity-generalization branch

    Build Errors

    Warning: @export [/Users/vandej27/workspace/alakazam/R/Diversity.R#526]: may only span a single line
    Warning: @param [/Users/vandej27/workspace/alakazam/R/Diversity.R#539]: requires a value
    Warning: @export [/Users/vandej27/workspace/alakazam/R/Diversity.R#824]: may only span a single line
    Warning: @export [/Users/vandej27/workspace/alakazam/R/Diversity.R#1087]: may only span a single line
    

    R CMD check --as-cran --run-donttest --timings

    ── R CMD check results ──────────────────────────────── alakazam 0.2.11.999 ────
    Duration: 1m 32.3schecking examples ... ERROR
      Running examples inalakazam-Ex.Rfailed
      The error most likely occurred in:
    
      > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
      > ### Name: calcInferredDiversity
      > ### Title: Calculate the diversity index
      > ### Aliases: calcInferredDiversity
      > 
      > ### ** Examples
      > 
      > # May define p as clonal member counts
      > p <- c(1, 1, 3, 10)
      > q <- c(0, 1, 2)
      > calcDiversity(p, q)
      Error in calcDiversity(p, q) : could not find function "calcDiversity"
      Execution haltedchecking Rd cross-references ... WARNING
      Missing link or links in documentation object 'helperAlpha.Rd':calcDiversityMissing link or links in documentation object 'plotAbundanceCurve.Rd':calcDiversity’ ‘DiversityTestMissing link or links in documentation object 'plotDiversityTest.Rd':DiversityTestMissing link or links in documentation object 'rarefyDiversity.Rd':calcDiversityMissing link or links in documentation object 'testDiversity.Rd':calcDiversity’ ‘DiversityTestSee section 'Cross-references' in the 'Writing R Extensions' manual.checking for code/documentation mismatches ... WARNING
      S4 class codoc mismatches from documentation object 'AbundanceCurve-class':
      Slots for class 'AbundanceCurve'
        Code: abund bootstrap ci clone group groups max_n min_n nboot uniform
        Docs: ci data groups n nboot
    
      S4 class codoc mismatches from documentation object 'DiversityCurve-class':
      Slots for class 'DiversityCurve'
        Code: ci div div_group div_groups method q test
        Docs: ci data groups n nbootchecking Rd \usage sections ... WARNING
      Undocumented arguments in documentation object 'calculateAlphaDiversity'boot_obj’ ‘min_q’ ‘max_q’ ‘step_q’ ‘ciUndocumented arguments in documentation object 'calculateBetaDiversity'boot_obj’ ‘comparisons’ ‘min_q’ ‘max_q’ ‘step_q’ ‘ciUndocumented arguments in documentation object 'estimateAbundance'uniform’ ‘min_nUndocumented arguments in documentation object 'getSegment'uniqueUndocumented arguments in documentation object 'helperAlpha'boot_output’ ‘qDocumented arguments not in \usage in documentation object 'helperAlpha':data’ ‘copy’ ‘min_q’ ‘max_q’ ‘step_q’ ‘min_n’ ‘max_n’ ‘ci’ ‘nboot’
        ‘uniform’ ‘progressUndocumented arguments in documentation object 'helperBeta'boot_output’ ‘q’ ‘ci_z’ ‘clone’ ‘groupUndocumented arguments in documentation object 'helperTest'div_df’ ‘group’ ‘qDuplicated \argument entries in documentation object 'plotAbundanceCurve':dataDocumented arguments not in \usage in documentation object 'plotAbundanceCurve':q’ ‘group’ ‘clone’ ‘copy’ ‘min_n’ ‘max_n’ ‘nboot’ ‘progressDuplicated \argument entries in documentation object 'rarefyDiversity':data’ ‘group’ ‘clone’ ‘copy’ ‘ci’ ‘nboot’ ‘progressUndocumented arguments in documentation object 'testDiversity'ciFunctions with \usage entries need to have the appropriate \alias
      entries, and all their arguments documented.
      The \usage entries must correspond to syntactically valid R code.
      See chapterWriting R documentation filesin theWriting R
      Extensionsmanual.checking R code for possible problems ... NOTE
      calculateAlphaDiversity: no visible binding for global variable.’
      calculateAlphaDiversity: no visible binding for global variableDcalculateAlphaDiversity: no visible binding for global variableD_ERRORcalculateAlphaDiversity: no visible binding for global variableQcalculateAlphaDiversity: no visible binding for global variableD_0calculateAlphaDiversity: no visible binding for global variableD_LOWERcalculateAlphaDiversity: no visible binding for global variableD_UPPERcalculateBetaDiversity: no visible binding for global variable.’
      calculateBetaDiversity: no visible binding for global variableQcalculateBetaDiversity: no visible binding for global variableDcalculateBetaDiversity: no visible binding for global variableD_0calculateBetaDiversity: no visible binding for global variableD_LOWERcalculateBetaDiversity: no visible binding for global variableD_UPPERestimateAbundance : bootstrap_: no visible binding for global variable.’
      estimateAbundance: no visible binding for global variableSEQUENCESestimateAbundance: no visible binding for global variable.’
      estimateAbundance: no visible binding for global variableCestimateAbundance: no visible binding for global variablePestimateAbundance: no visible binding for global variableP_ERRORhelperBeta: no visible binding for global variable.’
      helperBeta: no visible binding for global variableQhelperBeta: no visible binding for global variableGAMMAhelperBeta: no visible binding for global variableALPHAhelperBeta: no visible binding for global variableDhelperBeta: no visible binding for global variableD_ERRORhelperTest: no visible binding for global variable.’
      helperTest: no visible binding for global variableQhelperTest: no visible binding for global variableDplotDiversityTest: no visible binding for global variableisotype_curveplotDiversityTest: no visible binding for global variableQtestDiversity: no visible global function definition forbootstrapDiversityUndefined global functions or variables:
        . ALPHA C D D_0 D_ERROR D_LOWER D_UPPER GAMMA P P_ERROR Q SEQUENCES
        bootstrapDiversity isotype_curve
      Consider adding
        importFrom("stats", "C", "D")
      to your NAMESPACE file.
    
    1 error| 3 warnings| 1 noteError: R CMD check found ERRORs
    Execution halted
    
    Exited with status 1.
    

    Test Failures

    testTopology.R:54: failure: Test tableEdges
    tab$PARENT not equal to c("IgA", "IgA,IgG", "IgA,IgG", NA).
    3/4 mismatches
    x[1]: NA
    y[1]: "IgA"
    
    x[2]: "IgA"
    y[2]: "IgA,IgG"
    
    x[4]: "IgA,IgG"
    y[4]: NA
    
    testTopology.R:55: failure: Test tableEdges
    tab$CHILD not equal to c("IgA,IgG", "IgA", "IgG", "IgA").
    4/4 mismatches
    x[1]: "IgA"
    y[1]: "IgA,IgG"
    
    x[2]: "IgA,IgG"
    y[2]: "IgA"
    
    x[3]: "IgA"
    y[3]: "IgG"
    
    x[4]: "IgG"
    y[4]: "IgA"
    
    testTopology.R:56: failure: Test tableEdges
    tab$COUNT not equal to c(1, 1, 3, 1).
    2/4 mismatches (average diff: 2)
    [3] 1 - 3 == -2
    [4] 3 - 1 ==  2
    
  2. Roy Jiang

    Thanks, the remaining errors I have involve the tidyeval and testTopology errors. The latter can be fixed with a merge since that is part of Ken’s additions I believe. The tidyeval has to be fixed in the same way Susanna did already which I can handle independently after merging.

    * using log directory ‘/home/ruoyi/Dropbox/hg/alakazam.Rcheck’
    * using R version 3.4.2 (2017-09-28)
    * using platform: x86_64-redhat-linux-gnu (64-bit)
    * using session charset: UTF-8
    * using options ‘--run-donttest --as-cran’
    * checking for file ‘alakazam/DESCRIPTION’ ... OK
    * checking extension type ... Package
    * this is package ‘alakazam’ version ‘0.2.11.999’
    * package encoding: UTF-8
    * checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
    Maintainer: ‘Jason Vander Heiden <jason.vanderheiden@yale.edu>’
    * checking package namespace information ... OK
    * checking package dependencies ... OK
    * checking if this is a source package ... OK
    * checking if there is a namespace ... OK
    * checking for executable files ... OK
    * checking for hidden files and directories ... OK
    * checking for portable file names ... OK
    * checking for sufficient/correct file permissions ... OK
    * checking whether package ‘alakazam’ can be installed ... OK
    * checking installed package size ... OK
    * checking package directory ... OK
    * checking ‘build’ directory ... OK
    * checking DESCRIPTION meta-information ... OK
    * checking top-level files ... OK
    * checking for left-over files ... OK
    * checking index information ... OK
    * checking package subdirectories ... OK
    * checking R files for non-ASCII characters ... OK
    * checking R files for syntax errors ... OK
    * checking whether the package can be loaded ... OK
    * checking whether the package can be loaded with stated dependencies ... OK
    * checking whether the package can be unloaded cleanly ... OK
    * checking whether the namespace can be loaded with stated dependencies ... OK
    * checking whether the namespace can be unloaded cleanly ... OK
    * checking use of S3 registration ... OK
    * checking dependencies in R code ... OK
    * checking S3 generic/method consistency ... OK
    * checking replacement functions ... OK
    * checking foreign function calls ... OK
    * checking R code for possible problems ... NOTE
    calculateAlphaDiversity: no visible binding for global variable ‘.’
    calculateAlphaDiversity: no visible binding for global variable ‘D’
    calculateAlphaDiversity: no visible binding for global variable
      ‘D_ERROR’
    calculateAlphaDiversity: no visible binding for global variable ‘Q’
    calculateAlphaDiversity: no visible binding for global variable ‘D_0’
    calculateAlphaDiversity: no visible binding for global variable
      ‘D_LOWER’
    calculateAlphaDiversity: no visible binding for global variable
      ‘D_UPPER’
    calculateBetaDiversity: no visible binding for global variable ‘.’
    calculateBetaDiversity: no visible binding for global variable ‘Q’
    calculateBetaDiversity: no visible binding for global variable ‘D’
    calculateBetaDiversity: no visible binding for global variable ‘D_0’
    calculateBetaDiversity: no visible binding for global variable
      ‘D_LOWER’
    calculateBetaDiversity: no visible binding for global variable
      ‘D_UPPER’
    estimateAbundance : bootstrap_: no visible binding for global variable
      ‘.’
    estimateAbundance: no visible binding for global variable ‘SEQUENCES’
    estimateAbundance: no visible binding for global variable ‘.’
    estimateAbundance: no visible binding for global variable ‘C’
    estimateAbundance: no visible binding for global variable ‘P’
    estimateAbundance: no visible binding for global variable ‘P_ERROR’
    helperBeta: no visible binding for global variable ‘.’
    helperBeta: no visible binding for global variable ‘Q’
    helperBeta: no visible binding for global variable ‘GAMMA’
    helperBeta: no visible binding for global variable ‘ALPHA’
    helperBeta: no visible binding for global variable ‘D’
    helperBeta: no visible binding for global variable ‘D_ERROR’
    helperTest: no visible binding for global variable ‘.’
    helperTest: no visible binding for global variable ‘Q’
    helperTest: no visible binding for global variable ‘D’
    plotDiversityTest: no visible binding for global variable ‘Q’
    Undefined global functions or variables:
      . ALPHA C D D_0 D_ERROR D_LOWER D_UPPER GAMMA P P_ERROR Q SEQUENCES
    Consider adding
      importFrom("stats", "C", "D")
    to your NAMESPACE file.
    * checking Rd files ... OK
    * checking Rd metadata ... OK
    * checking Rd line widths ... OK
    * checking Rd cross-references ... OK
    * checking for missing documentation entries ... OK
    * checking for code/documentation mismatches ... OK
    * checking Rd \usage sections ... OK
    * checking Rd contents ... OK
    * checking for unstated dependencies in examples ... OK
    * checking contents of ‘data’ directory ... OK
    * checking data for non-ASCII characters ... OK
    * checking data for ASCII and uncompressed saves ... OK
    * checking R/sysdata.rda ... OK
    * checking line endings in C/C++/Fortran sources/headers ... OK
    * checking compiled code ... OK
    * checking installed files from ‘inst/doc’ ... OK
    * checking files in ‘vignettes’ ... OK
    * checking examples ... NOTE
    Examples with CPU or elapsed time > 5s
                  user system elapsed
    plotMRCATest 5.463   0.01   5.519
    * checking for unstated dependencies in vignettes ... OK
    * checking package vignettes in ‘inst/doc’ ... OK
    * checking re-building of vignette outputs ... OK
    * checking PDF version of manual ... OK
    * DONE
    Status: 2 NOTEs
    
  3. Jason Vander Heiden

    Most of the visible binding errors can be fixed by converting the tidyverse calls to standard-evaluation. @ssnn should be able to explain how to do this. It's intially confusing, but ultimately pretty simple to implement. It'll mostly be things like replacing SEQUENCES with rlang::sym("SEQUENCES").

    The one exception is the .. For this, add . <- NULL to the very top of each function with the error; see countGenes for an example.

    You should fix all these before merging, except for those topology tests if they are indeed fixed in the default branch. That’s pretty much the point of having branches - to have a safe space to make unstable code production ready before merging into the main branch. :)

  4. Roy Jiang

    Sounds good…attaching the checks below. Getting a warning below however…

    WARNING
    '::' or ':::' import not declared from: rlang
    

    Will merge and hand off to you guys then.

    [ruoyi@localhost hg]$ R CMD check --as-cran --run-donttest --timings alakazam_0.2.11.999.tar.gz
    * using log directory ‘/home/ruoyi/Dropbox/hg/alakazam.Rcheck’
    * using R version 3.4.2 (2017-09-28)
    * using platform: x86_64-redhat-linux-gnu (64-bit)
    * using session charset: UTF-8
    * using options ‘--run-donttest --as-cran’
    * checking for file ‘alakazam/DESCRIPTION’ ... OK
    * checking extension type ... Package
    * this is package ‘alakazam’ version ‘0.2.11.999’
    * package encoding: UTF-8
    * checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
    Maintainer: ‘Jason Vander Heiden <jason.vanderheiden@yale.edu>’
    * checking package namespace information ... OK
    * checking package dependencies ... OK
    * checking if this is a source package ... OK
    * checking if there is a namespace ... OK
    * checking for executable files ... OK
    * checking for hidden files and directories ... OK
    * checking for portable file names ... OK
    * checking for sufficient/correct file permissions ... OK
    * checking whether package ‘alakazam’ can be installed ... OK
    * checking installed package size ... OK
    * checking package directory ... OK
    * checking ‘build’ directory ... OK
    * checking DESCRIPTION meta-information ... OK
    * checking top-level files ... OK
    * checking for left-over files ... OK
    * checking index information ... OK
    * checking package subdirectories ... OK
    * checking R files for non-ASCII characters ... OK
    * checking R files for syntax errors ... OK
    * checking whether the package can be loaded ... OK
    * checking whether the package can be loaded with stated dependencies ... OK
    * checking whether the package can be unloaded cleanly ... OK
    * checking whether the namespace can be loaded with stated dependencies ... OK
    * checking whether the namespace can be unloaded cleanly ... OK
    * checking use of S3 registration ... OK
    * checking dependencies in R code ... WARNING
    '::' or ':::' import not declared from: ‘rlang’
    * checking S3 generic/method consistency ... OK
    * checking replacement functions ... OK
    * checking foreign function calls ... OK
    * checking R code for possible problems ... OK
    * checking Rd files ... OK
    * checking Rd metadata ... OK
    * checking Rd line widths ... OK
    * checking Rd cross-references ... OK
    * checking for missing documentation entries ... OK
    * checking for code/documentation mismatches ... OK
    * checking Rd \usage sections ... OK
    * checking Rd contents ... OK
    * checking for unstated dependencies in examples ... OK
    * checking contents of ‘data’ directory ... OK
    * checking data for non-ASCII characters ... OK
    * checking data for ASCII and uncompressed saves ... OK
    * checking R/sysdata.rda ... OK
    * checking line endings in C/C++/Fortran sources/headers ... OK
    * checking compiled code ... OK
    * checking installed files from ‘inst/doc’ ... OK
    * checking files in ‘vignettes’ ... OK
    * checking examples ... NOTE
    Examples with CPU or elapsed time > 5s
                  user system elapsed
    plotMRCATest 5.533      0   5.569
    * checking for unstated dependencies in vignettes ... OK
    * checking package vignettes in ‘inst/doc’ ... OK
    * checking re-building of vignette outputs ... OK
    * checking PDF version of manual ... OK
    * DONE
    
  5. Jason Vander Heiden

    Unless you have a typo, that error should vanish after the merge because it's just a missing @importFrom directive.

  6. Roy Jiang

    Ok merged.

    rlang still has a WARNING despite merge but not relevant to this issue so closing this.

  7. Log in to comment