R CMD check WARNINGS

Issue #134 resolved
Barry Grant created an issue

On master branch as of Thu Nov 20 13:33:48 EST 2014 Lets try to run and solve R CMD check after each major edit to avoid these building up in the future. Thanks!

* checking dependencies in R code ... WARNING
'::' or ':::' import not declared from:ggplot2'loadNamespace' or 'requireNamespace' call not declared from:ggplot2See the information on DESCRIPTION files in the chapterCreating R
packagesof theWriting R Extensionsmanual.
* checking S3 generic/method consistency ... WARNING
as.pdb:
  function(...)
as.pdb.prmtop:
  function(prmtop, crd, inds, inds.crd, ncore)

print:
  function(x, ...)
print.cnapath:
  function(pa, ...)

summary:
  function(object, ...)
summary.cnapath:
  function(pa, ..., pdb, label, col, plot, concise, cutoff, normalize)

See sectionGeneric functions and methodsof theWriting R
Extensionsmanual.
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
atom.select.prmtop: no visible global function definition foramb2pdbcnapath : <anonymous>: no visible global function definition for%--%summary.cnapath: no visible binding for global variableLengthsummary.cnapath: no visible binding for global variableStatesummary.cnapath: no visible binding for global variablebwsummary.cnapath: no visible binding for global variable..density..summary.cnapath: no visible binding for global variableNodesummary.cnapath: no visible binding for global variable..count..* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Missing link or links in documentation object 'read.crd.amber.Rd':amb2pdbMissing link or links in documentation object 'read.prmtop.Rd':amb2pdbSee the information in section 'Cross-references' of the 'Writing R
Extensions' manual.

* checking for missing documentation entries ... WARNING
Undocumented code objects:print.prmtopAll user-level objects in a package should have documentation entries.
See the chapterWriting R documentation filesin theWriting R
Extensionsmanual.
* checking for code/documentation mismatches ... WARNING
Codoc mismatches from documentation object 'as.pdb':
as.pdb.prmtop
  Code: function(prmtop, crd = NULL, inds = NULL, inds.crd = inds,
                 ncore = NULL)
  Docs: function(pdb, crd, inds = NULL, inds.crd = inds, ncore = NULL,
                 ...)
  Argument names in code not in docs:
    prmtop
  Argument names in docs not in code:
    pdb ...
  Mismatches in argument names:
    Position: 1 Code: prmtop Docs: pdb
  Mismatches in argument default values:
    Name: 'crd' Code: NULL Docs:

* checking Rd \usage sections ... WARNING
Undocumented arguments in documentation object 'as.pdb'pdb

Comments (8)

  1. Lars Skjærven

    by the way, is there a reasons for why printseq=TRUE in print.pdb() and FALSE in summary.pdb()

    print.pdb <- function(x, ...) {
      ## Print a summary of basic PDB object features
      y <- summary.pdb(x, printseq=TRUE, ...)
    }
    
    summary.pdb <- function(object, printseq=FALSE, ...) {
    

    documentation says printseq=FALSE

  2. Barry Grant reporter

    I believe my intention was to have print.pdb() be more verbose (with the sequence) but summary() be more concise along the lines of other R summary functions. Is there a miss-math with the documentation?

  3. Lars Skjærven

    from the documentation I get the impression that the default of printseq is FALSE:

    summary(object, printseq=FALSE, ...)
    

    but in the code of print.pdb() it is specified to be TRUE. thus, if I want to use print I will get:

    > print(pdb, printseq=F)
    Error in summary.pdb(x, printseq = TRUE, ...) : 
      formal argument "printseq" matched by multiple actual arguments
    

    I would set the default to TRUE in summary.pdb(), and remove the argument from inside print.pdb() ?

  4. Barry Grant reporter

    Ahh I see, so we can't currently turn printseq off in print.pdb(). Your suggestion would lead to the sequence being printed with both summary.pdb() and print.pdb(), which is what I wanted to avoid. I think the summary should by default be shorter and without the sequence. Therefore, I would suggest the following change to print.pdb() although I have not checked if this will cause some inconsistency and thus complaints with the parent print function:

    # new print function
    print.pdb2 <- function(x, printseq=TRUE, ...) {
      ## Print a summary of basic PDB object features
      y <- summary.pdb(x, printseq=printseq, ...)
    }
    
    > print.pdb2(pdb, print=F)
    
     Call:  read.pdb(file = "4AKE")
    
       Total Models#: 1
         Total Atoms#: 3459,  XYZs#: 10377  Chains#: 2  (values: A B)
    
         Protein Atoms#: 3312  (residues/Calpha atoms#: 428)
         Nucleic acid Atoms#: 0  (residues/phosphate atoms#: 0)
    
         Non-protein/nucleic Atoms#: 147  (residues: 147)
         Non-protein/nucleic resid values: [HOH (147) ]
    
    + attr: atom, helix, sheet, seqres, xyz,
            calpha, call
    

    What do you think?

  5. Log in to comment