0

I try to test my package developed on Ubuntu 16.04 with Windows 7. For both platforms I work on R 3.3.1 (but I also test on 3.3.0).

My package is saved on my GitHub repo (https://github.com/charlottesirot/elementR). When I run this command from Ubuntu, no problem happens:

    library(devtools)
    install_github("charlottesirot/elementR", dependencies = T , force = T)

but with windows 7, I have the following answer:

Downloading GitHub repo charlottesirot/elementR@master from URL https://api.github.com/repos/charlottesirot/elementR/zipball/master Installing elementR "C:/PROGRA~1/R/R-33~1.1/bin/i386/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD \ INSTALL \ "C:/Users/Cha/AppData/Local/Temp/RtmpUX1GVA/devtoolsa907a336b/charlottesirot-elementR-103e064" \ --library="C:/Users/Cha/Documents/R/win-library/3.3" --install-tests

  • installing source package 'elementR' ... ** R ** inst ** preparing package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'XML' ERROR: lazy loading failed for package 'elementR'
  • removing 'C:/Users/Cha/Documents/R/win-library/3.3/elementR' Error: Command failed (1)

As I understand, R tries to install the dependencies of my package (e.g. Shiny...) but it does not manage to install the dependencies of the dependencies (e.g. XML from gnumeric package)

Thus I try to manually install XML thinking that perhaps there was a problem with XML and then:

  • installing source package 'elementR' ... ** R ** inst ** preparing package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called 'gtools' ERROR: lazy loading failed for package 'elementR'
  • removing 'C:/Users/Cha/Documents/R/win-library/3.3/elementR'

I cannot install all the packages manually, it does not make sense !!!

Moreover when I try something less cryptic than my package, thinking that I could makea mistake in my code:

install_github("hadley/ggplot2", force = T)
  • installing source package 'ggplot2' ... ** R ** data *** moving datasets to lazyload DB ** inst ** tests ** preparing package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'assertthat' ERROR: lazy loading failed for package 'ggplot2'
  • removing 'C:/Users/Cha/Documents/R/win-library/3.3/ggplot2'
  • restoring previous 'C:/Users/Cha/Documents/R/win-library/3.3/ggplot2' Error: Command failed (1 )

I think there is a problem from the install_github ??? What do you think ??

Here is my Namespace:

exportPattern("^[[:alpha:]]+")

importFrom(R6, R6Class)
importFrom(shinyjs, colourInput)
importFrom(shinyjs, delay)
importFrom(shinyjs, useShinyjs)
importFrom(gnumeric, read.gnumeric.sheet)
importFrom(abind, abind)
importFrom(tcltk2, tk2text)
importFrom(gdata, read.xls)
importFrom("readODS", read.ods)
importFrom("grDevices", "bmp", "colorRampPalette", "dev.off", "jpeg",
             "png", "rainbow", "tiff")
importFrom("graphics", "abline", "layout", "legend", "mtext", "par",
             "plot", "points", "rect", "text", "title")
importFrom("stats", "sd")
importFrom("utils", "read.table", "write.csv", "write.table")

import(shinydashboard, shiny, stringr, lmtest, reader, devtools, tcltk)

For me, it looks ok but what do you think ?

I looked at a lot of article on internet but I only found one message which is exactly the same than my case but it is not enough informative : Cannot install "flexdashboard package"

I am totally stuck at this point and I would like to have your help regarding this issue.

Thank you verrrrrry much in advance !!

CHa

Community
  • 1
  • 1
CharlotteS.
  • 355
  • 1
  • 12

1 Answers1

2

Recently, I encountered a similar or maybe related issue. As it turned out, there was a bug in devtools install_github, missing the correct installation of dependencies, despite dependecies=TRUE. Have a look at: Does install_github recursively install dependencies? If the problem persists, better contact the authors directly via their github repository.

Plus, I just observed another issue arising after a Windows update, during which permissions seemed to have been altered to download or update packages into personal Win User libraries instead of the "default" R library folder. I suspect devtools seemed consequently lost as to which packages were loaded or available at which versioning. A fresh R reinstallation (i.e., library folder cleansing) solved that issue, but such may not always be convenient.

Community
  • 1
  • 1
martin
  • 785
  • 5
  • 17
  • this is useful information, but I think this implies that the question should be closed as a duplicate of the linked question?? – Ben Bolker Oct 19 '16 at 00:22
  • that depends on whether it provides a solution; it may at least be linked? I had some negative experiences on questions being marked as duplicated which finally were not duplicates but thus remained unanswered. – martin Oct 19 '16 at 13:22
  • I agree. The OP of this question was "last seen on August 29" according to their profile, so we may never find out ... – Ben Bolker Oct 19 '16 at 14:24
  • Sorry I just saw your answers !!! My fault :D, anyway, apparently it was a bug from install github but see https://github.com/hadley/devtools/issues/1298 And again thanks for your answers !! – CharlotteS. Jan 20 '17 at 10:45