r - Error while loading packages from non-default library paths -


how load packages not present in .libpaths()??

checking libraries

.libpaths() # [1] "/m/home/userxyz/unix/r/x86_64-pc-linux-gnu-library/3.4" # [2] "/usr/local/lib/r/site-library"                                    # [3] "/usr/lib/r/site-library"                                          # [4] "/usr/lib/r/library"  

adding new path

newpath = "/m/home/userxyz/unix/r/x86_64-pc-linux-gnu-library/devpacks/"  .libpaths( c( .libpaths(), newpath) )  libpaths() # [1] "/m/home/userxyz/unix/r/x86_64-pc-linux-gnu-library/3.4"      # [2] "/usr/local/lib/r/site-library"                                         # [3] "/usr/lib/r/site-library"                                               # [4] "/usr/lib/r/library"                                                    # [5] "/m/home/userxyz/unix/r/x86_64-pc-linux-gnu-library/devpacks" 

installing development version of package

withr::with_libpaths(new = newpath, devtools::install_github('tidyverse/ggplot2')) 

loading installed package

library(ggplot2, lib.loc = "/m/home/userxyz/unix/r/x86_64-pc-linux-gnu-library/devpacks") 

checking loaded package version

> sessioninfo() r version 3.4.1 (2017-06-30) platform: x86_64-pc-linux-gnu (64-bit) running under: ubuntu 16.04.3 lts  matrix products: default blas: /usr/lib/openblas-base/libblas.so.3 lapack: /usr/lib/libopenblasp-r0.2.18.so  locale:  [1] lc_ctype=en_gb.utf-8       lc_numeric=c               lc_time=en_dk.utf8         lc_collate=en_gb.utf-8      [5] lc_monetary=en_gb.utf-8    lc_messages=en_gb.utf-8    lc_paper=fi_fi.utf8        lc_name=c                   [9] lc_address=c               lc_telephone=c             lc_measurement=en_gb.utf-8 lc_identification=c         attached base packages: [1] stats     graphics  grdevices utils     datasets  methods   base       other attached packages: [1] withr_2.0.0          dplyr_0.5.0          plotly_4.7.0         ggplot2_2.2.1        shinydashboard_0.6.1 [6] shiny_1.0.3.9000     curl_2.7             httr_1.2.1           devtools_1.13.2       loaded via namespace (and not attached):  [1] rcpp_0.12.11      git2r_0.18.0      compiler_3.4.1    plyr_1.8.4        tools_3.4.1       digest_0.6.12      [7] jsonlite_1.5      memoise_1.1.0     tibble_1.3.3      gtable_0.2.0      viridislite_0.2.0 rlang_0.1.1       [13] dbi_0.6-1         crosstalk_1.0.0   yaml_2.1.14       knitr_1.16        htmlwidgets_0.8   grid_3.4.1        [19] data.table_1.10.4 r6_2.2.2          purrr_0.2.2.2     tidyr_0.6.3       magrittr_1.5      scales_0.4.1.9002 [25] htmltools_0.3.6   assertthat_0.2.0  mime_0.5          xtable_1.8-2      colorspace_1.3-2  httpuv_1.3.3      [31] labeling_0.3      lazyeval_0.2.0    munsell_0.4.3     

it has loaded cran version of ggplot2 package located in location (/m/home/userxyz/unix/r/x86_64-pc-linux-gnu-library/3.4) instead of dev version of package installed in location (/m/home/userxyz/unix/r/x86_64-pc-linux-gnu-library/devpacks)


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -