[R] R CMD methods and ggplot2 advice

Duncan Murdoch murdoch.duncan at gmail.com
Tue May 26 13:20:22 CEST 2015


This posting should probably go to the new R-package-devel mailing list
instead of R-help.  If you do re-post there, you should give more
information to let people help you.  We can see the errors, but we can't
see the source to your package, so it's hard to diagnose them.  If your
source is online somewhere, a link to it would really help.  If not,
then please include a copy of the DESCRIPTION file (so we can see how
you declared dependence on methods), and extracts from the source of
CreditEnhancement() where you use Period, etc.

Duncan Murdoch

On 25/05/2015 8:24 PM, Glenn Schultz wrote:
> Hello All,
> 
> I have two packages Bond Lab and the Companion to Investing in MBS.  Bond Lab clears the check and I am working on the on.load() to copy a needed directory per Duncan Murdoch's advise to make Bond Lab CRAN-able.  The companion passes with two notes.  The output is below:
> 
> I get two notes (highlighted in red)
> 
> Not sure on this one as I tried to declare methods but I get another note methods declared but not used.  The second note is related to ggplot2 they are variable passed to ggplot2 within a function.  I am not sure why they appear in the R CMD check.  If someone could point in the right direction to resolve these I would appreciate the advice.  These are my last remaining two issues to make the packages pass CRAN aside from the on.load()
> 
> Best Regards,
> Glenn
> 
> * checking dependencies in R code ... NOTE
> package ‘methods’ is used but not declared
> 
> 
> * checking R code for possible problems ... NOTE
> CreditEnhancement: no visible binding for global variable ‘Period’
> CreditEnhancement: no visible binding for global variable ‘Value’
> CreditEnhancement: no visible binding for global variable ‘Variable’
> CreditEnhancement: no visible binding for global variable ‘..density..’
> PassThrough.OAS: no visible binding for global variable ‘value’
> PassThrough.OAS: no visible binding for global variable ‘..density..’
> PassThroughCashFlow: no visible binding for global variable ‘Period’
> PassThroughCashFlow: no visible binding for global variable ‘value’
> PassThroughCashFlow: no visible binding for global variable ‘variable’
> PlotMtgKeyRates: no visible binding for global variable ‘Tenor’
> PlotMtgKeyRates: no visible binding for global variable ‘Duration’
> PlotTermStructure: no visible binding for global variable ‘value’
> PlotTermStructure: no visible binding for global variable ‘variable’
> REMICOAS: no visible binding for global variable ‘value’
> REMICOAS: no visible binding for global variable ‘..density..’
> TotalReturn: no visible binding for global variable ‘Scenario’
> TotalReturn: no visible binding for global variable ‘value’
> TotalReturn: no visible binding for global variable ‘variable’
> TwistScenario: no visible binding for global variable ‘Scenario’
> TwistScenario: no visible binding for global variable ‘Return’
> ValuationFramework: no visible binding for global variable ‘value’
> ValuationFramework: no visible binding for global variable ‘variable’
> 
> ==> devtools::check()
> 
> Updating Companion2IMBS documentation
> Loading Companion2IMBS
> '/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD build  \
>   '/Users/glennschultz/Companion to Investing in MBS' --no-resave-data  \
>   --no-manual 
> 
> * checking for file ‘/Users/glennschultz/Companion to Investing in MBS/DESCRIPTION’ ... OK
> * preparing ‘Companion2IMBS’:
> * checking DESCRIPTION meta-information ... OK
> * checking for LF line-endings in source and make files
> * checking for empty or unneeded directories
> Removed empty directory ‘Companion2IMBS/inst’
> Removed empty directory ‘Companion2IMBS/test/testthat’
> Removed empty directory ‘Companion2IMBS/test’
> * building ‘Companion2IMBS_1.0.tar.gz’
> 
> '/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD check  \
>   '/var/folders/tv/sq6gmnvs13j8jrhkt87f_zmc0000gn/T//RtmpOabREs/Companion2IMBS_1.0.tar.gz'  \
>   --timings 
> 
> * using log directory ‘/Users/glennschultz/Companion2IMBS.Rcheck’
> * using R version 3.0.3 (2014-03-06)
> * using platform: x86_64-apple-darwin10.8.0 (64-bit)
> * using session charset: UTF-8
> * checking for file ‘Companion2IMBS/DESCRIPTION’ ... OK
> * checking extension type ... Package
> * this is package ‘Companion2IMBS’ version ‘1.0’
> * 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 ‘Companion2IMBS’ can be installed ... OK
> * checking installed package size ... OK
> * checking package 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 dependencies in R code ... NOTE
> package ‘methods’ is used but not declared
> See the information on DESCRIPTION files in the chapter ‘Creating R
> packages’ of the ‘Writing R Extensions’ manual.
> * checking S3 generic/method consistency ... OK
> * checking replacement functions ... OK
> * checking foreign function calls ... OK
> * checking R code for possible problems ... NOTE
> CreditEnhancement: no visible binding for global variable ‘Period’
> CreditEnhancement: no visible binding for global variable ‘Value’
> CreditEnhancement: no visible binding for global variable ‘Variable’
> CreditEnhancement: no visible binding for global variable ‘..density..’
> PassThrough.OAS: no visible binding for global variable ‘value’
> PassThrough.OAS: no visible binding for global variable ‘..density..’
> PassThroughCashFlow: no visible binding for global variable ‘Period’
> PassThroughCashFlow: no visible binding for global variable ‘value’
> PassThroughCashFlow: no visible binding for global variable ‘variable’
> PlotMtgKeyRates: no visible binding for global variable ‘Tenor’
> PlotMtgKeyRates: no visible binding for global variable ‘Duration’
> PlotTermStructure: no visible binding for global variable ‘value’
> PlotTermStructure: no visible binding for global variable ‘variable’
> REMICOAS: no visible binding for global variable ‘value’
> REMICOAS: no visible binding for global variable ‘..density..’
> TotalReturn: no visible binding for global variable ‘Scenario’
> TotalReturn: no visible binding for global variable ‘value’
> TotalReturn: no visible binding for global variable ‘variable’
> TwistScenario: no visible binding for global variable ‘Scenario’
> TwistScenario: no visible binding for global variable ‘Return’
> ValuationFramework: no visible binding for global variable ‘value’
> ValuationFramework: no visible binding for global variable ‘variable’
> * 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 examples ... [60s/60s] OK
> Examples with CPU or elapsed time > 5s
>                     user system elapsed
> TwistScenario     18.827  1.037  19.872
> PassThrough.OAS   17.485  0.068  17.567
> CreditEnhancement 10.959  0.128  11.106
> PlotMtgKeyRates   10.081  0.421  10.506
> * checking PDF version of manual ... OK
> NOTE: There were 2 notes.
> See
>   ‘/Users/glennschultz/Companion2IMBS.Rcheck/00check.log’
> for details.
> 
> 
> 
> R CMD check succeeded
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list