[Rd] Problem tracking down an R CMD check syntax error
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Fri Oct 20 19:23:54 CEST 2006
On Fri, 20 Oct 2006, Ulrike Grömping wrote:
>
> My original post got slightly messed up somehow, so let me restructure it in
> order to make it understandable:
>
> Dear all,
>
> I am stuck with tracking down an error I get from R CMD check (Windows, R
> 2.4.0, same error for R 2.2.1): when running R CMD check over a modified
> version of package relaimpo, I get the following output in install.out:
>
> preparing package relaimpo for lazy loading
> Loading required package: MASS
> Loading required package: boot
> Error in parse(file, n, text, prompt) : syntax error at
> 2193:
> }
> 2194:
> Error: unable to load R code in package 'relaimpo'
> Execution halted
> make: *** [lazyload] Error 1
> *** Installation of relaimpo failed ***
>
> I've tracked down the "}" in question, and it is in the file zzz.R that
> hasn't been changed for ages and works without problems in the current
> version of the package. I include this file below. Does anyone have a hint
> for me where I should look for the root cause of the problem ?
Earlier files: this is after concatenating all the files.
Check for missing final newlines on all the files, and that you can
source() them individually.
> Regards, Ulrike
>
> ############## file zzz.R which gets blamed #############
> .onLoad <- function(lib, pkg){
> if(!require(MASS, quietly = TRUE))
> stop("Could not load package MASS")
> if(!require(boot, quietly = TRUE))
> stop("Could not load package boot")
> if(!require(methods, quietly = TRUE))
> stop("Could not load package methods")
>
> cat("This is the non-US version of package relaimpo including the metric
> pmvd.","\n")
> cat("Please make sure that you are entitled to using it.","\n")
> cat("If you are a US-user, please use the global version (without pmvd) that
> is available on CRAN.","\n")
>
> #cat("This is the global version of package relaimpo.","\n")
> #cat( "If you are a non-US user, a version with the interesting additional
> metric pmvd is available","\n")
> #cat("from Ulrike Groempings web site at www.tfh-berlin.de/~groemp.","\n")
>
> }
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> --
> View this message in context: http://www.nabble.com/Problem-tracking-down-an-R-CMD-check-syntax-error-tf2481045.html#a6920950
> Sent from the R devel mailing list archive at Nabble.com.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list