role-model / roleR

R package implementing the RoLE model
https://role-model.github.io/roleR
GNU General Public License v3.0
1 stars 2 forks source link

Undocumented C code objects #98

Closed diazrenata closed 1 year ago

diazrenata commented 1 year ago

(RMD keeping notes, no specific questions yet)

One of the build failure warnings is:


❯ checking for missing documentation entries ... WARNING
  Undocumented code objects:
    ‘buildFun’ ‘cFun’ ‘checkRolePhylo’ ‘createRolePredModel’ ‘dataFunCpp’
    ‘getFinalState’ ‘getSumStats’ ‘getSumStatsMean’ ‘getValuesFromParams’
    ‘hillAbund’ ‘hillGenetic’ ‘hillPhylo’ ‘hillTrait’ ‘intFunCpp’
    ‘iterModelCpp’ ‘localComm’ ‘metaComm’ ‘out’ ‘paramValues’ ‘quickExp’
    ‘quickModel’ ‘quickModelNonRun’ ‘quickParams’ ‘rawAbundance’
    ‘rawApePhylo’ ‘rawBranchLengths’ ‘rawGenDiv’ ‘rawSeqs’
    ‘rawSpAbundance’ ‘rawSppID’ ‘rawTraits’ ‘repS4’ ‘richness’ ‘roleData’
    ‘roleDataFromCpp’ ‘roleDataToCpp’ ‘roleExperiment’ ‘roleModel’
    ‘roleModelGiven’ ‘roleParams’ ‘runRole’ ‘setContext’ ‘testRand’
    ‘untbParams’ ‘vectFunCpp’ ‘writeRole’

Many of these (not all) are Cpp functions. I tried to add Roxygen-legible documentation to the C code. When I try to re-generate the export files, I am getting warnings about errors in the C code:

> Rcpp::compileAttributes()
There were 18 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: Unable to parse C++ default value 'NULL' for argument probs of function intFunCpp
2: Unable to parse C++ default value 'NULL' for argument x of function intFunCpp
3: Unable to parse C++ default value 'NULL' for argument local of function dataFunCpp
4: Unable to parse C++ default value 'NULL' for argument meta of function dataFunCpp
5: Unable to parse C++ default value 'NULL' for argument phylo of function dataFunCpp
6: Unable to parse C++ default value 'NULL' for argument params of function dataFunCpp
7: Unable to parse C++ default value 'NULL' for argument niter of function dataFunCpp
8: Unable to parse C++ default value 'NULL' for argument i of function dataFunCpp
9: Unable to parse C++ default value 'NULL' for argument dead_index of function dataFunCpp
10: Unable to parse C++ default value 'NULL' for argument parent_indv of function dataFunCpp
11: Unable to parse C++ default value 'NULL' for argument dispersed_this_iter of function dataFunCpp
12: Unable to parse C++ default value 'NULL' for argument speciation_sp of function dataFunCpp
13: Unable to parse C++ default value 'NULL' for argument local of function vectFunCpp
14: Unable to parse C++ default value 'NULL' for argument meta of function vectFunCpp
15: Unable to parse C++ default value 'NULL' for argument phylo of function vectFunCpp
16: Unable to parse C++ default value 'NULL' for argument params of function vectFunCpp
17: Unable to parse C++ default value 'NULL' for argument niter of function vectFunCpp
18: Unable to parse C++ default value 'NULL' for argument i of function vectFunCpp

and it doesn't seem to add the functions to the docs

diazrenata commented 1 year ago

solved: to make the docs visible to Rcpp, you need the apostrophe:

\\' @name

(instead of \\ @name)