R Installing rCharts on R 3.4.2 x64 - r

I had a little bit of trouble installing rCharts for R version 3.2.1. I have referenced a question that addresses an earlier version of R, but the solution did not work for me exactly. [Link]
It would appear that there wasn't a rCharts package for R that can be installed using the install.packages() command
Updated for 3.2.2 x64
Updated for 3.4.2 x64

I hope my way helps.
install.packages("devtools")
install.packages("Rcpp")
library(devtools)
library(Rcpp)
install_github('ramnathv/rCharts', force= TRUE)
I have tested this method on a clean install of R 3.4.2 x64.
R version 3.4.2 (2017-09-28) -- "Short Summer"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Workspace loaded from ~/.RData]
> install.packages("devtools")
Warning in install.packages :
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Installing package into ‘C:/Users/frank/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.4/PACKAGES.rds': HTTP status was '404 Not Found'
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/devtools_1.13.3.zip'
Content type 'application/zip' length 443924 bytes (433 KB)
downloaded 433 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\frank\AppData\Local\Temp\RtmpEJRBVY\downloaded_packages
> install.packages("Rcpp")
Installing package into ‘C:/Users/frank/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/Rcpp_0.12.13.zip'
Content type 'application/zip' length 4353971 bytes (4.2 MB)
downloaded 4.2 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\frank\AppData\Local\Temp\RtmpEJRBVY\downloaded_packages
> library(devtools)
> library(Rcpp)
> install_github('ramnathv/rCharts')
Skipping install of 'rCharts' from a github remote, the SHA1 (479a4f98) has not changed since last install.
Use `force = TRUE` to force installation
> install.packages("devtools")
Error in install.packages : Updating loaded packages
> install.packages("Rcpp")
Error in install.packages : Updating loaded packages
> library(devtools)
> library(Rcpp)
> install_github('ramnathv/rCharts', force= TRUE)
Downloading GitHub repo ramnathv/rCharts#master
from URL https://api.github.com/repos/ramnathv/rCharts/zipball/master
Restarting R session...
> install.packages("devtools")
Warning in install.packages :
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Installing package into ‘C:/Users/frank/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.4/PACKAGES.rds': HTTP status was '404 Not Found'
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/devtools_1.13.3.zip'
Content type 'application/zip' length 443924 bytes (433 KB)
downloaded 433 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\frank\AppData\Local\Temp\RtmpiSWkVr\downloaded_packages
> library(devtools)
> library(Rcpp)
> install_github('ramnathv/rCharts', force= TRUE)
Downloading GitHub repo ramnathv/rCharts#master
from URL https://api.github.com/repos/ramnathv/rCharts/zipball/master
Installing rCharts
"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/frank/AppData/Local/Temp/RtmpiSWkVr/devtools3ff09fd3b8/ramnathv-rCharts-479a4f9" \
--library="C:/Users/frank/Documents/R/win-library/3.4" --install-tests
* installing *source* package 'rCharts' ...
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (rCharts)

The first answer did not work for me. But try this one:
Download the package from https://github.com/ramnathv/rCharts as zip file and expand it to
"C:\rchartsdownload"
Then, install the following packages:
install.packages("devtools")
install.packages("Rcpp")
install.packages("RCurl")
install.packages("RJSONIO")
library(devtools)
library(Rcpp)
library(RCurl)
library(RJSONIO)
and finally:
install.packages("C:/rchartsdownload", repos = NULL, type="source")

Related

R cannot download websockets package from the github

The manual is written here:https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/R
The mentioned code is written in Section 2 of Install libraries
Problems are with this part
library(devtools)
install_github("brettjbush/R-Websockets")
With R and RTools versions above 4.0 I have following error.
> install_github("brettjbush/R-Websockets")
Downloading GitHub repo brettjbush/R-Websockets#HEAD
Installing 1 packages: caTools
Installing package into ‘\\energia.sise/dfs/REDIRECT/german.suhharukov/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/caTools_1.18.0.zip'
Content type 'application/zip' length 317292 bytes (309 KB)
downloaded 309 KB
package ‘caTools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\german.suhharukov\AppData\Local\Temp\RtmpoRYGc0\downloaded_packages
√ checking for file 'C:\Users\german.suhharukov\AppData\Local\Temp\RtmpoRYGc0\remotes1aa03e212c08\brettjbush-R-Websockets-fc7ee9c/DESCRIPTION' (1s)
- preparing 'websockets':
√ checking DESCRIPTION meta-information ...
- cleaning src
Warning in system2(command, args, stdout = NULL, stderr = NULL, ...) :
'CreateProcess' failed to run 'C:\rtools40\usr\bin\make.exe -f "C:/PROGRA~1/R/R-40~1.3/share/make/clean.mk" -f Makevars.win clean'
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'websockets_1.1.7.tar.gz'
Installing package into ‘\\sise/dfs/REDIRECT/MYNAME/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
'\\sise\dfs\REDIRECT\MYNAME\Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'websockets' ...
** using staged installation
** libs
*** arch - i386
Error in system(cmd) :
(converted from warning) 'CreateProcess' failed to run 'C:\rtools40\usr\bin\make.exe -f "Makevars.win" -f "C:/PROGRA~1/R/R-40~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-40~1.3/share/make/winshlib.mk" SHLIB="websockets.dll" OBJECTS="libsock.o"'
* removing '\\sise/dfs/REDIRECT/MYNAME/Documents/R/win-library/4.0/websockets'
Error: Failed to install 'websockets' from GitHub:
(converted from warning) installation of package ‘C:/Users/MYNAME/AppData/Local/Temp/RtmpoRYGc0/file1aa0518554ea/websockets_1.1.7.tar.gz’ had non-zero exit status
> install.packages("caTools")
Installing package into ‘\\sise/dfs/REDIRECT/MYNAME/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/caTools_1.18.0.zip'
Content type 'application/zip' length 317292 bytes (309 KB)
downloaded 309 KB
package ‘caTools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\MYNAME\AppData\Local\Temp\XXXXXXX\downloaded_packages
>
Errors are following
> library(devtools)
Loading required package: usethis
> install_github("brettjbush/R-Websockets")
Downloading GitHub repo brettjbush/R-Websockets#master
trying URL 'https://cran.rstudio.com/bin/windows/Rtools/Rtools35.exe'
Content type 'application/x-msdownload' length 108622512 bytes (103.6 MB)
downloaded 103.6 MB
Error: Failed to install 'websockets' from GitHub:
Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
> pkgbuild::check_build_tools(debug = TRUE)
trying URL 'https://cran.rstudio.com/bin/windows/Rtools/Rtools35.exe'
Content type 'application/x-msdownload' length 108622512 bytes (103.6 MB)
downloaded 103.6 MB
Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
> find_rtools()
[1] TRUE
> Sys.which("ls.exe")
ls.exe
"C:\\Rtools\\bin\\ls.exe"
How can I download this package?
In the notes on github it says "NOTE: This package is no longer maintained. For implementing websocket servers in R, try the httpuv package"
Another possible problem could be that you are running a new version of R with an old version of Rtools. So I'd try to install the newest version of Rtools or run an older version of R with a compatible version of Rtools, such that you can build and compile the package.
I ran your code on my machine running R 4.0.2 and Rtools 4.0.0 and did not face any issues installing the package. So I'd suggest installinng the newest version of R and Rtools from here: https://cran.r-project.org/bin/windows/Rtools/ and trying again.

Error in installing *install.packages("tstools")* in language R

I am getting some error while installing package tstools.
Several other packages were installed correctly like(xts, forecast, MAPA, openxslx),
but this one causing trouble.
R version: 3.5.0
RStudio version: 1.1.447
CRAN: Indonesia
OS: windows 10
Here is the error log...
> install.packages("tstools")
Installing package into ‘C:/Users/pc_name/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘data.table’
There is a binary version available but the source version is later:
binary source needs_compilation
tstools 0.3.6 0.3.6.1 FALSE
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘data.table’
These will not be installed
installing the source package ‘tstools’
trying URL 'https://cran.rstudio.com/src/contrib/tstools_0.3.6.1.tar.gz'
Content type 'application/x-gzip' length 960748 bytes (938 KB)
downloaded 938 KB
ERROR: dependency 'data.table' is not available for package 'tstools'
* removing 'C:/Users/pc_name/Documents/R/win-library/3.5/tstools'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘tstools’ had non-zero exit status
The downloaded source packages are in ‘C:\Users\pc_name\AppData\Local\Temp\Rtmp6l4hr7\downloaded_packages’
Have you tried using devtools?
install.packages("devtools")
devtools::install_github("trnnick/TStools")
Sometimes bioconductor also does the trick
source("https://bioconductor.org/biocLite.R")
biocLite("tstools")
Have you tried install.packages("tstools", dependencies = T) ?

Trouble installing glmmadmb in R

I am having trouble installing glmmADMB package and hoping to get some help here. I've talked to people I know who uses R but we couldn't figure this out.
Looks like the error is about a symbol in the directory. However, the ' is included as a default naming convention in Windows and I can't seem to change the folder name. I name my computer Vanessa and it automatically give the user folder name "Vanessa's PC". [It might not due to this error, since I have ran some other codes that included this symbol in the command.] Any suggestions or thoughts would be greatly appreciated.
This is the log I got:
install.packages("glmmADMB",
+ repos=c("http://glmmadmb.r-forge.r-project.org/repos",
+ getOption("repos")),
+ type="source")
Installing package into ‘C:/Users/Vanessa's PC/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'http://glmmadmb.r-forge.r-project.org/repos/src/contrib/glmmADMB_0.8.3.3.tar.gz'
Content type 'application/x-gzip' length 9391177 bytes (9.0 MB)
downloaded 9.0 MB
installing source package 'glmmADMB' ...
** R
** data
* moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Warning: package 'MASS' was built under R version 3.4.4
** help
* installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* arch - i386
Error: unexpected symbol in "tools:::.test_load_package('glmmADMB', 'C:/Users/Vanessa's"
Execution halted
* arch - x64
Error: unexpected symbol in "tools:::.test_load_package('glmmADMB', 'C:/Users/Vanessa's"
Execution halted
ERROR: loading failed for 'i386', 'x64'
removing 'C:/Users/Vanessa's PC/Documents/R/win-library/3.4/glmmADMB'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\Vanessa's PC\Documents\R\win-library\3.4" C:\Users\VANESSA'S~1\AppData\Local\Temp\Rtmp2piXfe/downloaded_packages/glmmADMB_0.8.3.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘glmmADMB’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Vanessa's PC\AppData\Local\Temp\Rtmp2piXfe\downloaded_packages’
Try installing the devtools package first and then installing glmmADMB directly from the development version on GitHub:
> library(devtools)
> devtools::install_github("bbolker/glmmadmb")
Downloading GitHub repo bbolker/glmmadmb#master
from URL https://api.github.com/repos/bbolker/glmmadmb/zipball/master
Installing glmmADMB
Installing 1 package: R2admb
Installing package into ‘C:/Users/User/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/R2admb_0.7.16.zip'
Content type 'application/zip' length 505317 bytes (493 KB)
downloaded 493 KB
package ‘R2admb’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\User\AppData\Local\Temp\Rtmp4WWJZp\downloaded_packages
"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file --no-environ
--no-save -- no-restore --quiet CMD INSTALL \
"C:/Users/User/AppData/Local/Temp/Rtmp4WWJZp/devtools28d0200a7e9b/bbolker-
glmmadmb-ac75f73" \
--library="C:/Users/User/Documents/R/win-library/3.4" --install-tests
* installing *source* package 'glmmADMB' ...
....
> library(glmmADMB)
Loading required package: MASS
Attaching package: ‘glmmADMB’
The following object is masked from ‘package:MASS’:
stepAIC
The following object is masked from ‘package:stats’:
step
This works:
install.packages("R2admb")
install.packages("glmmADMB",
repos=c("http://glmmadmb.r-forge.r-project.org/repos",
getOption("repos")),
type="source")
library(glmmADMB)

error installing package rweka however rjava is up to date

I am trying to install the package RWeka. I installed the java version 8, but i am keep getting this error. Can anybody help?
> install.packages('RWeka')
There is a binary version available but the source version is later:
binary source needs_compilation
RWeka 0.4-26 0.4-33 FALSE
installing the source package ‘RWeka’
trying URL 'https://cran.rstudio.com/src/contrib/RWeka_0.4-33.tar.gz'
Content type 'application/x-gzip' length 415763 bytes (406 KB)
==================================================
downloaded 406 KB
* installing *source* package ‘RWeka’ ...
** package ‘RWeka’ successfully unpacked and MD5 sums checked
Need at least Java version 1.7/7.0.
ERROR: configuration failed for package ‘RWeka’
* removing ``‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RWeka’
Warning in install.packages :
installation of package ‘RWeka’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/sh/6qsjq6gn0ysf4h1cv9nctzfr0000gn/T/RtmpCVEaSY/downloaded_packages’``
From experience, I believe there is a difference between Java and Java Offline.
Try installing the x86/x64 offline version from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html (A handy link to keep hold of)
If you have the newest Java, just open a terminal and run
sudo R CMD javareconf
Then in a R-session,
install.packages("rJava",type='source')
install.packages("RWeka")
Ref: https://justrocketscience.com/post/install-rweka-mac

Why do I get this error installing rmarkdown

I try to use rmarkdown and I've got many troubles so far. The first one is when the Rstudio as if it should install new versions of packages. It can not go over it. I tried to install one by one all the required packages but than I got this error
trying URL 'https://cran.rstudio.com/bin/windows/contrib/2.15/knitr_1.5.zip'
Content type 'application/zip' length 910172 bytes (888 Kb)
opened URL
downloaded 888 Kb
package ‘evaluate’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
package ‘formatR’ successfully unpacked and MD5 sums checked
package ‘highr’ successfully unpacked and MD5 sums checked
package ‘markdown’ successfully unpacked and MD5 sums checked
package ‘stringr’ successfully unpacked and MD5 sums checked
package ‘knitr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\mali\AppData\Local\Temp\Rtmpcz1Ywk\downloaded_packages
Error: invalid version specification ‘NA’
In addition: Warning message:
In utils:::packageDescription(packageName, fields = "Version") :
no package 'knitr' was found
I installed packages one by one and I can load them but it does not work as a whole i.r. file -> new -> rmarkdown
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Swedish_Sweden.1252 LC_CTYPE=Swedish_Sweden.1252 LC_MONETARY=Swedish_Sweden.1252 LC_NUMERIC=C
[5] LC_TIME=Swedish_Sweden.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rmarkdown_0.9.6 knitr_1.12.3
loaded via a namespace (and not attached):
[1] digest_0.6.9 htmltools_0.3.5 Rcpp_0.12.4 tools_3.1.2
I spotted recently that I got this kind of message when starting Rstudio
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Error: invalid version specification ‘NA’
In addition: Warning message:
In utils:::packageDescription(packageName, fields = "Version") :
no package 'knitr' was found
>
I did as #DAV recommended. Tried to install other version. No success
> url <- "https://cran.r-project.org/src/contrib/Archive/knitr/knitr_1.0.tar.gz"
> install.packages(url, repos=NULL, type="source")
Installing package into ‘\\xxx/users/Eke/mali/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.r-project.org/src/contrib/Archive/knitr/knitr_1.0.tar.gz'
Content type 'application/x-gzip' length 451348 bytes (440 Kb)
opened URL
downloaded 440 Kb
* installing *source* package 'knitr' ...
** package 'knitr' successfully unpacked and MD5 sums checked
** R
** demo
** inst
** preparing package for lazy loading
Warning in file(con, "r") :
file("") only supports open = "w+" and open = "w+b": using the former
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
there is no package called 'knitr'
Error: loading failed
Execution halted
ERROR: loading failed
* removing '\\xxxxxx/users/Eke/mali/Documents/R/win-library/3.1/knitr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.2/bin/i386/R" CMD INSTALL -l "\\xxxxx\users\Eke\mali\Documents\R\win-library\3.1" "C:/Users/mali/AppData/Local/Temp/RtmpoN1qrM/downloaded_packages/knitr_1.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/mali/AppData/Local/Temp/RtmpoN1qrM/downloaded_packages/knitr_1.0.tar.gz’ had non-zero exit status
It drives me crazy. I uninstalled "knitr" and tried to install again. ERROR
> install.packages("knitr", dependencies = F)
Installing package into ‘\\xxxx.se/users/Eke/mali/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.1/knitr_1.12.3.zip'
Content type 'application/zip' length 812186 bytes (793 Kb)
opened URL
downloaded 793 Kb
package ‘knitr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\mali\AppData\Local\Temp\RtmpaChLQ5\downloaded_packages
Error: invalid version specification ‘NA’
In addition: Warning message:
In utils:::packageDescription(packageName, fields = "Version") :
no package 'knitr' was found
And it happened when I wanted to install shiny
> install.packages("shiny", dependencies = F)
Installing package into ‘\\xxxxx.xxx/users/Eke/mali/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.1/shiny_0.13.2.zip'
Content type 'application/zip' length 2257481 bytes (2.2 Mb)
opened URL
downloaded 2.2 Mb
package ‘shiny’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\mali\AppData\Local\Temp\RtmpC0nOFC\downloaded_packages
Error: invalid version specification ‘NA’
In addition: Warning message:
In utils:::packageDescription(packageName, fields = "Version") :
no package 'knitr' was found
You can tell RStudio the location of your library through the .libPaths()
command and then manually selecting knitr and the other packages necessary to use the "rmarkdown" documents in RStudio through the Packages window in your screen.
getwd()
# "C:/Users/s146753/Dropbox/Chapter 2"
.libPaths()
# "\\\\home2.bio.ed.ac.uk/s146753/R/win-library/3.3" "C:/Program Files/R/R-3.3.2/library"
.libPaths("C:/Program Files/R/R-3.3.2/library")
.libPaths()
# "C:/Program Files/R/R-3.3.2/library"

Resources