[R] Debugging issues encountered during the "R CMD check" process

Jason Rupert jasonkrupert at yahoo.com
Thu Jan 7 23:50:50 CET 2010


Thanks a ton for the reply.  

If I understand your recommendation below you are saying to set "R_KEEP_PKG_SOURCE=yes" as an environment variable and then run "R CMD check signal" and hope that additional debug messages are printed. 

If that is the case, I believe I may have followed those instructions:

jason-ruperts-macbook-pro:r-signal jasonkrupert$ set R_KEEP_PKG_SOURCE=yes
jason-ruperts-macbook-pro:r-signal jasonkrupert$ R CMD check signal
* checking for working pdflatex ... OK
* using log directory '/Users/jasonkrupert/Documents/RStuff/Rsignal/r-signal/signal.Rcheck'
* using R version 2.9.2 (2009-08-24)
* using session charset: UTF-8
* checking for file 'signal/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'signal' version '0.6'
....
....
....
> ### * interp
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: interp
> ### Title: Interpolate / Increase the sample rate
> ### Aliases: interp
> ### Keywords: math
> 
> ### ** Examples
> 
> 
> # The graph shows interpolated signal following through the
> # sample points of the original signal.
> t = seq(0, 2, by = 0.01)
> x = chirp(t,2,.5,10,'quadratic') + sin(2*pi*t*0.4)
> y = interp(x[seq(1, length(x), by = 4)],4,4,1)   # interpolate a sub-sample
Warning in rbind(x, array(val, dim = c(n - nx, NCOL(x)))) :
  number of columns of result is not a multiple of vector length (arg 1)
Warning in Fft(postpad(x, N)) * B :
  longer object length is not a multiple of shorter object length
Error in ifft(Fft(postpad(x, N)) * B) : 
  dims [product 36] do not match the length of object [256]
Calls: interp -> fftfilt -> fftfiltx -> ifft
Execution halted



To my novice eye, it appears that the error message are the same as before.   

I guess, in order to debug this problem more thoroughly, will I need to "source" all the files and then run this example, which is where the error appears to be occurring? 

I was not sure about the best protocol for addressing errors that occur during the "R CMD check" process, especially since they are not in the R Console and not possible to "browser()" into the issue...

Thanks again for any insights or feedback. 










----- Original Message ----
From: Duncan Murdoch <murdoch at stats.uwo.ca>
To: Jason Rupert <jasonkrupert at yahoo.com>
Cc: R-help at r-project.org
Sent: Thu, January 7, 2010 2:02:25 PM
Subject: Re: [R] Debugging issues encountered during the "R CMD check" process

On 07/01/2010 2:48 PM, Jason Rupert wrote:
> I read through the "Writing R Extensions" and the "Debugging in R" website (http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/), looking for some hints about how to solve the issue of debugging problems encountered during the "R CMD check" process, but nothing seems to be mentioned about addressing issues encountered. 
> Specifically, I am working with the R signal package which is hosted at the following location:
> http://code.google.com/p/r-signal/
> 
> I would like to debug the problem that is shown below, and is encountered when I run "R CMD check signal". 
> Thank you for any insights that are provided as the R signal package is nice and it would be good to have it working again with R 2.9.x and beyond. 
> Thank you again for the help. 
> >From the 00check.log
> 
> * using log directory '/Users/jasonkrupert/Documents/RStuff/Rsignal/r-signal/signal.Rcheck'
> * using R version 2.9.2 (2009-08-24)
> * using session charset: UTF-8
> * checking for file 'signal/DESCRIPTION' ... OK
> * checking extension type ... Package
> * this is package 'signal' version '0.6'
> * checking package dependencies ... OK
> * checking if this is a source package ... WARNING
> ....
> ....
> ....
> > > ### Name: interp
> > ### Title: Interpolate / Increase the sample rate
> > ### Aliases: interp
> > ### Keywords: math
> > > ### ** Examples
> > > > # The graph shows interpolated signal following through the
> > # sample points of the original signal.
> > t = seq(0, 2, by = 0.01)
> > x = chirp(t,2,.5,10,'quadratic') + sin(2*pi*t*0.4)
> > y = interp(x[seq(1, length(x), by = 4)],4,4,1)   # interpolate a sub-sample
> Warning in rbind(x, array(val, dim = c(n - nx, NCOL(x)))) :
>   number of columns of result is not a multiple of vector length (arg 1)
> Warning in Fft(postpad(x, N)) * B :
>   longer object length is not a multiple of shorter object length
> Error in ifft(Fft(postpad(x, N)) * B) :   dims [product 36] do not match the length of object [256]
> Calls: interp -> fftfilt -> fftfiltx -> ifft
> Execution halted
> 
>  

You'll often get more informative error messages in recent R releases if you set the environment variable

R_KEEP_PKG_SOURCE=yes

I don't know if it will help in this case.

Duncan Murdoch



More information about the R-help mailing list