Tutuchan / chartjs

An implementation of the Chart.js library in R
MIT License
30 stars 7 forks source link

needs htmlwidgets to install #7

Closed safferli closed 8 years ago

safferli commented 8 years ago

To install, you need to have the htmlwidgets library installed. I'm no expert on R packages, perhaps it can be included as an install dependency somehow?

> devtools::install_github("tutuchan/chartjs", ref = "dev")
Downloading GitHub repo tutuchan/chartjs@dev
Installing chartjs
Installing 1 packages: Rcpp
package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘Rcpp’
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL  \
  "C:/Users/***/AppData/Local/Temp/RtmpGscYiF/devtools14d47139622/Tutuchan-chartjs-dd18dd3" --library="C:/Program  \
  Files/R/R-3.2.2/library" --install-tests 

* installing *source* package 'chartjs' ...
** R
** inst
** tests
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'htmlwidgets'
ERROR: lazy loading failed for package 'chartjs'
* removing 'C:/Program Files/R/R-3.2.2/library/chartjs'
Error: Command failed (1)

It works if you install htmlwidgets:

> library(htmlwidgets)
Error in library(htmlwidgets) : es gibt kein Paket namens ‘htmlwidgets’
> install.packages("htmlwidgets")
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/htmlwidgets_0.5.zip'
Content type 'application/zip' length 727311 bytes (710 KB)
downloaded 710 KB

package ‘htmlwidgets’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\***\AppData\Local\Temp\RtmpGscYiF\downloaded_packages
> library(chartjs)
Error in library(chartjs) : es gibt kein Paket namens ‘chartjs’
> devtools::install_github("tutuchan/chartjs", ref = "dev")
Downloading GitHub repo tutuchan/chartjs@dev
Installing chartjs
Installing 1 packages: Rcpp
package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘Rcpp’
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL  \
  "C:/Users/***/AppData/Local/Temp/RtmpGscYiF/devtools14d43a66f29/Tutuchan-chartjs-dd18dd3" --library="C:/Program  \
  Files/R/R-3.2.2/library" --install-tests 

* installing *source* package 'chartjs' ...
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (chartjs)

Just thought to document this here in case someone else runs into the same issue!

Thanks for all your work, this is amazing! :)

Tutuchan commented 8 years ago

Hi safferli, thanks for the heads-up and your comment !

You're right, I need to update the DESCRIPTION file, I haven't done much work on this package these last few months but it should change soon.

I'll update the file when I get the chance later this week.

Tutuchan commented 8 years ago

Fixed in be038f0

safferli, I'm not sure in what state I left the dev version but I'll spend some time on it in the next few weeks so it can be used. In the meantime, the master branch should be stable.