5

I am very new to R and I need ggraph library and it can't be installed from rstudio console. Here is a message:

Warning in install.packages : package ‘ggraph’ is not available (for R version 3.3.2)

Are there other ways of installation? Looks like this library lives and flourishes:

https://www.r-bloggers.com/introduction-to-ggraph-layouts/

rafa.pereira
  • 13,251
  • 6
  • 71
  • 109
Andrew Anderson
  • 1,044
  • 3
  • 17
  • 26

1 Answers1

4

This requiresudunits2 library.

I use conda R, so I installed it using conda install -c ioos udunits2=2.2.20. You need to use a package manager to get it installed.

Then install the udunits2 R package

install.packages('udunits2', type = "source",
                     configure.args=c('--with-udunits2-lib=/Users/Karthik/anaconda/lib'))

Replace /Users/Karthik/anaconda/lib with the path to your R libraries. You can find it using .libPaths()

Finally install the development version of R packages

devtools::install_github("thomasp85/ggraph", dependencies=TRUE)
Karthik Arumugham
  • 1,300
  • 1
  • 11
  • 18
  • I did like that having in mind your reply: 1) `install.packages("udunits2")` 2) `library(udunits2)` 3) exactly your final piece `if(!require(devtools)) { install.packages('devtools') } devtools::install_github('hadley/ggplot2') devtools::install_github('thomasp85/ggforce') devtools::install_github('thomasp85/ggraph')` And it worked :). Thank you! – Andrew Anderson Feb 18 '17 at 13:41
  • 2
    Why not just `devtools::install_github("thomasp85/ggraph", dependencies=TRUE)` after you've taken care of the C library dependency? – hrbrmstr Feb 18 '17 at 14:17