none
Installing rChart in VS2017 RRS feed

  • Question

  • The various installations for rChart failed on win10/VS2017. 

    I got the following to work on a win7/CRAN machine:

    library(downloader)
    download("https://github.com/ramnathv/rCharts/archive/master.tar.gz", "rCharts.tar.gz")
    install.packages("rCharts.tar.gz", repos = NULL, type = "source")

    The following error occur when using VS:

    > library(Rcpp)
    > install.packages("rCharts.tar.gz", repos = NULL, type = "source")
    Installing package into `C:/Users/user/Documents/R/win-library/3.3'
    (as `lib' is unspecified)
    Warning in untar2(tarfile, files, list, exdir, restore_times) :
      skipping pax global extended headers
    ERROR: failed to lock directory 'C:/Users/user/Documents/R/win-library/3.3' for modifying
    Try removing 'C:/Users/user/Documents/R/win-library/3.3/00LOCK-rCharts-master'
    Warning messages:
    1: running command '"C:/PROGRA~1/MICROS~1/RCLIEN~1/R_SERVER/bin/x64/R" CMD INSTALL -l "C:\Users\user\Documents\R\win-library\3.3" "rCharts.tar.gz"' had status 3
    2:
    In utils::install.packages(...) :
     

     installation of package `rCharts.tar.gz' had non-zero exit status

    =====after folder removal

    install.packages("rCharts.tar.gz", repos = NULL, type = "source")
    Installing package into `C:/Users/user/Documents/R/win-library/3.3'
    (as `lib' is unspecified)
    Warning in untar2(tarfile, files, list, exdir, restore_times) :
      skipping pax global extended headers
    * installing *source* package 'rCharts' ...
    Warning in file.copy(f, instdir, TRUE) :
      problem copying .\NAMESPACE to C:\Users\user\Documents\R\win-library\3.3\rCharts\NAMESPACE: Permission denied
    Warning in file(file, if (append) "a" else "w") :
      cannot open file 'C:/Users/user/Documents/R/win-library/3.3/rCharts/DESCRIPTION': Permission denied
    Error in file(file, if (append) "a" else "w") :
      cannot open the connection
    ERROR: installing package DESCRIPTION failed for package 'rCharts'
    * removing 'C:/Users/user/Documents/R/win-library/3.3/rCharts'

    Saturday, December 30, 2017 1:32 AM

All replies

  • It looks like the default R library folder is not writeable by you as you are currently logged in in both cases.

    This is the kind of error you would get('failed to lock directory' and 'problem copying') if the directory isn't writeable.

    Either try installing with Administrator privileges or try installing to a different library folder.

    For example:

    .libPaths("C:/Users/testuser/Rlib")

    install.packages(...)

    You can change the default install location that way.

    Steve Weller

    Monday, January 8, 2018 10:35 PM