Unable to install "splitr" package from github

Hello. I'm currently trying to install the splitr package from github, which allows for using the NOAA's HYSPLIT Trajectory model within R. However, everytime I try to install the package I get the same error

> install_github("rich-iannone/SplitR")
Downloading GitHub repo rich-iannone/SplitR@master
These packages have more recent versions available.
Which would you like to update?

1: All                              
2: CRAN packages only               
3: None                             
4: digest  (0.6.23 -> 0.6.24) [CRAN]
5: stringi (1.4.4  -> 1.4.6 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
3
√  checking for file 'C:\Users\Chris Lawrence\AppData\Local\Temp\RtmpeCXJq6\remotes26f824fa376e\rich-iannone-splitr-3363136/DESCRIPTION' ...
-  preparing 'splitr': (819ms)
√  checking DESCRIPTION meta-information ... 
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  building 'splitr_0.4.0.9000.tar.gz'
   
Installing package into β€˜C:/Users/Chris Lawrence/Documents/R/win-library/3.6’
(as β€˜lib’ is unspecified)
* installing *source* package 'splitr' ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
ARGUMENT 'Lawrence\AppData\Local\Temp\RtmpIpHSqo\Rin5e8c7028e2' __ignored__

** help
*** installing help indices
  converting help for package 'splitr'
    finding HTML links ... done
    add_emissions                           html  
    add_grid                                html  
    add_source                              html  
    add_trajectory_params                   html  
    finding level-2 HTML links ... done

Rd warning: C:/Users/Chris Lawrence/AppData/Local/Temp/RtmpIpHSqo/R.INSTALL5e841235f3b/splitr/man/add_trajectory_params.Rd:65: missing link 'set_ascdata'
    create_dispersion_model                 html  
    create_grid                             html  
    create_trajectory_model                 html  
    dispersion_plot                         html  
    get_met_edas40                          html  
    get_met_forecast_nam                    html  
    get_met_gdas0p5                         html  
    get_met_gdas1                           html  
    get_met_gfs0p25                         html  
    get_met_hrrr                            html  
    get_met_nam12                           html  
    get_met_narr                            html  
    get_met_reanalysis                      html  
    get_output_tbl                          html  
    hysplit_dispersion                      html  
    hysplit_trajectory                      html  
Rd warning: C:/Users/Chris Lawrence/AppData/Local/Temp/RtmpIpHSqo/R.INSTALL5e841235f3b/splitr/man/hysplit_trajectory.Rd:55: missing link 'set_ascdata'
    pipe                                    html  
    run_model                               html  
    set_config                              html  
    splitr_setup                            html  
    trajectory_plot                         html  
    trajectory_read                         html  
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
ARGUMENT 'Lawrence\AppData\Local\Temp\RtmpIpHSqo\Rin5e839626362' __ignored__

** testing if installed package can be loaded from final location
ARGUMENT 'Lawrence\AppData\Local\Temp\RtmpIpHSqo\Rin5e83674516c' __ignored__

** testing if installed package keeps a record of temporary installation path
Warning in file(con, "rb") :
  cannot open file 'C:\Users\Chris Lawrence\AppData\Local\Temp\RtmpIpHSqo\file5e81d1572e': No such file or directory
Error in file(con, "rb") : cannot open the connection
* removing 'C:/Users/Chris Lawrence/Documents/R/win-library/3.6/splitr'
Error: Failed to install 'splitr' from GitHub:
  (converted from warning) installation of package β€˜C:/Users/Chris Lawrence/AppData/Local/Temp/RtmpeCXJq6/file26f8425f608d/splitr_0.4.0.9000.tar.gz’ had non-zero exit status

I can't seem to figure what's going on here. Any help is greatly appreciated.

Some times R has issues with empty spaces on windows user names, try installing on the system level library instead

.libPaths("C:\\Program Files\\R\\R-3.6.2\\library")
1 Like

I was able to switch to a system library, but now it says that the path isn't writable

Warning in install.packages :
  'lib = "C:/Program Files/R/R-3.6.0/library"' is not writable

Sorry if this is obvious stuff. I've just never run into this problem before.

You need to run Rstudio as administrator to been able to write on a system folder.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.