0

My goal is to create an interactive graph:

tkid <- tkplot(my_igraph_network_object) l <- tkplot.getcoords(tkid) plot(net, layout=l)

Which yields an error in the first line: "Error in tkplot(net) : tcl/tk library not available."

I tried to install the package manually:

install.packages("tcltk")

Running that line returned two warnings: 1.) "Warning in install.packages : package ‘tcltk’ is not available (for R version 3.3.0)", 2.) "Warning in install.packages : package ‘tcltk’ is a base package, and should not be updated"

Platform: x86_64-apple-darwin13.4.0.
R version: 3.3.0 (2016-05-03).

Also I noticed there is a similar question here, but the difference is that I need the igraph package.

Does someone have an idea how to deal with this error?

[Edit 1 @ 20160517] Also I was notified that it is a duplicate of this question, however the error message I get seems different. I tried the answers that were provided for this question, however, those don't seem to get me closer to fixing it.

Community
  • 1
  • 1
Bart Schuijt
  • 591
  • 1
  • 10
  • 14
  • I can't help with the `tcltk` package since I've never used it, but I would recommend checking out the `visNetwork` package for interactive network graphs as it has full `shiny` and `rmarkdown` compatibility. I'm not sure if `tcltk` offers that, or if the use of a different package is feasible, but I wanted to throw it out there. – tblznbits May 15 '16 at 14:15
  • @brittenb, thank you for the recommendation, I'll have a look at `visNetwork`. – Bart Schuijt May 16 '16 at 19:20

1 Answers1

0

You have to go here: https://cran.r-project.org/src/contrib/Archive/tcltk2/ This page contains all the old versions of the package.

I tried in my computer and I managed to install the last version available:

 tcltk2_1.2-10.tar.gz   02-Mar-2014 12:41   814K     

Then once you have downloaded the .tar file save it wherever you want, let's say the desktop. Then go to Rstudio then Tools - Install Packages - Install From: Package Archive File (.tar, .tar.gz) - Browse the folder where you saved your .tar and click install.

I haven't tried your commands as I do not have the data but this should work (it did in my computer)! In case it doesn't comment what happens!

Hope it helps a bit!

adrian1121
  • 904
  • 2
  • 9
  • 21