0

The example code provided in the git repo is leading to an error when I try to run it.

Here is the code:

    h1 <- Highcharts$new()
    h1$chart(type = "spline")
    h1$series(data = c(1, 3, 2, 4, 5, 4, 6, 2, 3, 5, NA), dashStyle = "longdash")
    h1$series(data = c(NA, 4, 1, 3, 4, 2, 9, 1, 2, 3, 4), dashStyle = "shortdot")
    h1$legend(symbolWidth = 80)
    h1

I got it from https://github.com/ramnathv/rCharts

It is producing the following error: Error in setListSpec(params$series, ..., replace = replace) : cannot change value of locked binding for 'obj'

Do I need to install Highcharts separately? I have verified that my installation of rCharts is working. Thanks in advance!

skmathur
  • 1,587
  • 5
  • 14
  • 21
  • Works fine for me. Try installing the latest version `devtools::install("ramnathv/rCharts")`. – jdharrison May 15 '14 at 08:31
  • It works for me too. As suggested by @jdharrison can you try again after installing the latest version. – Ramnath May 15 '14 at 13:29
  • I installed rCharts using the following: `require(devtools) install_github('rCharts', 'ramnathv')` Perhaps there's a dev version or a beta version that I am unaware of? – skmathur May 15 '14 at 17:49
  • This should work with the `master` version that you have installed. Can you print out your `sessionInfo()`? – Ramnath May 17 '14 at 13:58

1 Answers1

1

Re-installing rCharts and deleting all the environment variables prior to running the code solved this problem. If I come across it again, I will post sessionInfo().

skmathur
  • 1,587
  • 5
  • 14
  • 21
  • Honestly, I had tried that last week as well, before posting the question originally. I'm not sure what was different this time. – skmathur May 20 '14 at 22:58