Search code examples
rubuntunamespacesdevtools

Error in namespaceExports(ns, exports) on Ubuntu but not Windows


I have just initiated a EC2 server on AWS and I'm trying to install a package from github called 'krose/skm'. The package is installed without any issues on Windows, but not on Ubuntu. All dependencies are installed. I can't figure out why it can install on Windows, but not Ubuntu.

library(devtools)
install_github('krose/skm')

And the result of running the code above is:

Downloading GitHub repo krose/skm@master
from URL https://api.github.com/repos/krose/skm/zipball/master
Installing skm
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
CMD INSTALL '/tmp/RtmpxJg8N7/devtools1b887e511e96/krose-skm-059766b'  \
--library='/usr/local/lib/R/site-library' --install-tests

* installing *source* package ‘skm’ ...
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in namespaceExport(ns, exports) :
undefined exports: skm_umm_stations, skm_ummquery, skm_webquery
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/skm’
Error: Command failed (1)

The functions are documented using Roxygen2 and are exported. The functions are not assigned using <<-.

Here is my sessionInfo()

R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
 [1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] devtools_1.11.1

loaded via a namespace (and not attached):
 [1] httr_1.1.0    R6_2.1.2      tools_3.2.5   withr_1.0.1   curl_0.9.7
 [6] memoise_1.0.0 git2r_0.14.0  digest_0.6.9

I don't have much experience with Ubuntu.

UPDATE: The R CMD check has the following two notes:

* checking DESCRIPTION meta-information ... NOTE
License components which are templates and need '+ file LICENSE':
  MIT
* checking top-level files ... NOTE
Non-standard file/directory found at top level:
  'README.Rmd'

Solution

  • The R directory in the package was misnamed as r. Windows didn't pick up on the difference, since it is more forgiving about differences in case for file and directory names.