Jean-Baptiste-Camps / stemmatology

Stemmatological Analysis of Textual Traditions
GNU General Public License v3.0
15 stars 3 forks source link

Namespaces #18

Open Jean-Baptiste-Camps opened 7 years ago

Jean-Baptiste-Camps commented 7 years ago

Look at and fix namespaces issues.

NB:

Namespaces in Imports field not imported from:
  ‘cluster’ ‘network’ ‘sna’
  All declared Imports should be used.
Jean-Baptiste-Camps commented 7 years ago

This is a very important aspect, and not at all dealt with in the code. See for instance http://r-pkgs.had.co.nz/namespace.html for more explanations (and the manual for writing R packages).

Jean-Baptiste-Camps commented 7 years ago
* checking R code for possible problems ... NOTE
Import.TEIApparatus: no visible binding for global variable ‘x’
Import.TEIApparatus: no visible global function definition for
  ‘read.csv’
PCC: no visible global function definition for ‘legend’
PCC.Stemma: no visible global function definition for ‘as.network’
PCC.Stemma: no visible global function definition for ‘gplot’
PCC.Stemma: no visible binding for global variable ‘displaylabels’
PCC.Stemma: no visible global function definition for
  ‘network.vertex.names’
PCC.conflicts: no visible global function definition for ‘na.omit’
PCC.conflicts: no visible global function definition for ‘as.network’
PCC.conflicts: no visible global function definition for ‘gplot’
PCC.conflicts: no visible binding for global variable ‘displaylabels’
PCC.conflicts: no visible global function definition for
  ‘network.vertex.names’
PCC.contam: no visible global function definition for ‘par’
PCC.contam: no visible global function definition for ‘legend’
PCC.equipollent: no visible global function definition for ‘as.network’
PCC.equipollent: no visible global function definition for
  ‘as.matrix.network’
PCC.overconflicting: no visible global function definition for ‘pam’
PCC.overconflicting: no visible global function definition for
  ‘barplot’
PCC.overconflicting: no visible global function definition for ‘axis’
PCC.overconflicting: no visible global function definition for ‘par’
PCC.overconflicting: no visible global function definition for
  ‘as.network’
PCC.overconflicting: no visible global function definition for
  ‘as.matrix.network’
PCC.overconflicting: no visible global function definition for
  ‘network.vertex.names’
PCC.overconflicting: no visible global function definition for
  ‘set.vertex.attribute’
PCC.overconflicting: no visible global function definition for ‘gplot’
PCC.overconflicting: no visible binding for global variable
  ‘displaylabels’
PCC.overconflicting: no visible global function definition for
  ‘get.vertex.attribute’
PCC.reconstructModel: no visible global function definition for
  ‘as.network’
PCC.reconstructModel: no visible global function definition for ‘gplot’
PCC.reconstructModel: no visible binding for global variable
  ‘displaylabels’
PCC.reconstructModel: no visible global function definition for
  ‘network.vertex.names’
VL.pValues: no visible global function definition for ‘fisher.test’
VL.pValues: no visible global function definition for ‘plot’
Undefined global functions or variables:
  as.matrix.network as.network axis barplot displaylabels fisher.test
  get.vertex.attribute gplot legend na.omit network.vertex.names pam
  par plot read.csv set.vertex.attribute x
Consider adding
  importFrom("graphics", "axis", "barplot", "legend", "par", "plot")
  importFrom("stats", "fisher.test", "na.omit")
  importFrom("utils", "read.csv")
to your NAMESPACE file.
Jean-Baptiste-Camps commented 7 years ago

Il faut résoudre la question des globalVariables (la plupart des autres sont résolues dans ma prochaine PR), notamment car importante pour CRAN, cf. https://github.com/Rdatatable/data.table/issues/850

Jean-Baptiste-Camps commented 6 years ago

NB: utiliser les préfixes d'espace de nom pour un code plus propre et moins ambigu.

Jean-Baptiste-Camps commented 6 years ago

Use namespace base:: for base functions as well ?