package - How to debug a case where R CMD check fails under narrow circumstances -
apologies yet package build debugging, i'm stumped here.
using r-devel.sh cmd check tarifx.geo_1.0.6.tar.gz --as-cran
on (x)ubuntu 14.04 lts, installed via this script, following error:
* checking examples ... error running examples in ‘tarifx.geo-ex.r’ failed error occurred in: [ ...snip... ] > ### * </header> > library('tarifx.geo') loading required package: sp error in loadnamespace(i, c(lib.loc, .libpaths()), versioncheck = vi[[i]]) : there no package called ‘lattice’ error: package ‘sp’ not loaded execution halted
the manual package checking says:
before using these tools, please check package can installed (which checked can loaded). r cmd check inter alia this, may more detailed error messages doing install directly.
but when (being sure use r-devel, loaded --vanilla
), no error:
# 1) install.packages("tarifx.geo_1.0.6.tar.gz",repos=null) # 2) library(tarifx.geo) # 3) profit.
if run r cmd check
through rstudio or command line r (but not -devel version), no error.
thing is, when search entire project's code "lattice", can't find case use it, in example files. lattice
installed , i've tried checking lattice in suggests
, without.
project code here: https://github.com/gsk3/tarifx.geo
the check logs here.
now question: how go debugging this? have thoughts problem might lie (depends rather imports few packages, , spatial packages tend have intertangled namespaces), can't begin solve unless can reproduce error in environment other r cmd check
run command line via r-devel.sh
.
this, way, under development (unstable) (2014-05-26 r65771) -- "unsuffered consequences"
. appropriately named.
edit
here contents of /usr/local/lib/r/site-library
:
akima digest labeling plyr rjsonio stringr bitops evaluate lattice proto r.methodss3 survival boot fields mapproj pspline r.oo tarifx catools functional maps randomfields rsqlite tarifx.geo cluster gdata maptools rcolorbrewer r.utils testthat colorspace geor mass rcpp scales whisker data.table ggplot2 matrix rcurl shapefiles xtable dbi gtable memoise reshape2 sp devtools gtools munsell rgdal spam dichromat httr nlme rgeos splancs
the lattice
description file says:
depends: r (>= 2.15.1) built: r 3.2.0; x86_64-unknown-linux-gnu; 2014-05-29 17:14:03 utc; unix
still same error on cmd check
.
i had been attempting install site-wide library @ "/usr/local/lib/r/site-library"
did not solve it, instead brute-forced solution.
first, find places r might look:
> .libpaths() [1] "/usr/local/lib/r/site-library" [2] "/usr/lib/r/site-library" [3] "/usr/lib/r/library" [4] "/usr/local/lib/r-devel/lib/r/library"
then, root, install each of in turn until error goes away. turns out, it's "/usr/local/lib/r-devel/lib/r/library"
:
install.packages(c('lattice','sp'),lib="/usr/local/lib/r-devel/lib/r/library")
then q()
r-devel
session , run r-devel.sh cmd check mypackage.tar.gz --as-cran
.
as why needs lattice
in first place, suspect it's pulling in .rdata
file @ launch has lattice
in namespace.
many @dirkeddelbuettel , @gavinsimpson various shoves in right direction.
Comments
Post a Comment