Problems installing Slidify in RStudio - r

I am new to R-programming and I am trying to install Slidify and I am currently having a problem. I am running on the below version of RStudio:
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
I am using the below code to install Slidify:
install_github("slidify", "ramnathv")
install_github("slidifyLibraries", "ramnathv")*
I get the following error:
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
Error: Command failed (1)
In addition: Warning message:
Username parameter is deprecated. Please use ramnathv/slidifyLibraries
I have also tried the below code to install Slidify:
pkgs <- c('ramnathv/slidifyLibraries', 'ramnathv/slidify')
devtools::install_github(pkgs)*
and I get the following error:
Error: Command failed (1)
Does anyone have experience installing Slidify?

1) install_github() function is in devtools package, so first you have to install this package using install.packages("devtools").
2) Then load the library using
library(devtools)
3) Now use your code
install_github("slidify", "ramnathv")
install_github("slidifyLibraries", "ramnathv")
It will work properly.

Related

Install mxnet package in Rstudio Cloud

I want to install the package mxnet on Rstudio Cloud, which is the cloud version of Rstudio. I tried it first with R 3.6, then R 3.5.3, neither worked.
I tried to install from with this piece of code:
cran <- getOption("repos")
cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/"
cran["dmlc"] <- "https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/"
options(repos = cran)
install.packages("mxnet")
I got a 404 error file not found. Then i tried downloading the .tar.gz installation file associated with LInux/R/CPU, and it also gave an error:
ERROR: cannot extract package from
‘/cloud/project/apache-mxnet-src-1.5.0-incubating.tar.gz’
Here is my session info:
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS
Thanks for your help. I need to get this package installed and running on Rstudio Cloud.
RStudio Cloud is linux based
Platform: x86_64-pc-linux-gnu (64-bit)
The snippet you use is instruction for R on Windows CPU platform. R on Linux instruction there says to build it from source which wouldn't work on the cloud. Seems like no CRAN repo currently has binaries of the linux version of the mxnet package.
RStudio Cloud gives you access to the terminal and you can even download the sources for mxnet, but to build it you need sudo which the terminal doesn't provide so building from source stops on ./install_mxnet_ubuntu_r.sh command here:
git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
cd mxnet/docs/install
./install_mxnet_ubuntu_r.sh

start_session() from RWebdriver package doesn't work

I've installed package from git_hub under RStudio by:
install_github(repo = "Rwebdriver",username = "crubba")
Downloaded and started Selenium server v.3.3.1 from the command prompt by:
>java -jar seleniumXXX.jar
When I'm trying to run this command under RStudio:
start_session(root = "http://localhost:4444/wd/hub/", browser ="firefox")
I'm getting an error:
Error in serverDetails$value[[1]] : subscript out of bounds
I haven't any idea what is it.
Is anybody help me?
RStudio Version 0.99.903
R version 3.3.3
RWebdriver Version 0.1
OS - Windows 10
selenium server version 3.3.1
Java Version 8 update 121 (build 1.8.0_121-b13)

Error downloading previous package version in RStudio even though manual download works

I am trying to follow the instructions from RStudio to install an older version of ggplot2 with devtools::install_version. However, I am getting the following error:
> devtools::install_version("ggplot2", version = "2.1.0", repos = "https://cran.r-project.org")
Downloading package from url: https://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_2.1.0.tar.gz
/usr/bin/tar: Cannot execute remote shell: No such file or directory
/usr/bin/tar: C\:\\Users\\..\RtmpmqySfr\\file75c16051e90.tar.gz: Cannot open: I/O error
/usr/bin/tar: Error is not recoverable: exiting now
Error: Does not appear to be an R package (no DESCRIPTION)
My R version:
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
My RStudio version:
0.99.902
My devtools version:
devtools_1.12.0
I seem to be able to download the compressed package files directly by going to the URL found by devtools.
Why am I getting this error and how do I fix it?

Can't load package xlsx after upgrading to Sierra

I recently updated to Sierra and it seems like I can't load packages that depends on rJava anymore.
For example:
library(xlsx)
Gives:
Loading required package: rJava
Loading required package: xlsxjars
JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
Error : .onLoad failed in loadNamespace() for 'xlsx', details:
call: .jinit()
error: JNI_GetCreatedJavaVMs returned -1
Error: package or namespace load failed for ‘xlsx’
Here is my sessions info:
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12
And Java is updated to the latest version (8.111).
As far as I can understand from some similar posts the java directories is not configured correctly.
You can solve this with terminal commands that fix the wrongly configured directories and there are multiple posts that use this strategy. But this can be rather confusing.
A much easier strategy that worked for me is to use homebrew to install java. After installing Homebrew you can install java with the following commands
brew update
brew cask install java

R Recompiling documentation & package unload results in lazy-load error

I'm using Roxygen2 to document my R (3.2.4) package and have several windows open as I fix my function #examples:
1) R session where I type devtools::document() to update the Rd file
2) terminal window where I reinstall the package with the updated doc using
R CMD INSTALL myPackage
3) R session where I unload/reload the package and look at the updated documentation:
> detach(package:myPackage,unload=TRUE);require(myPackage)
> ?myTestFunc
The problem is in window 3. After running the detach() and require(), typing ?myTestFunc gives me the following error:
Error in fetch(key) :
lazy-load database '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/netDx/help/myTestFunc.rdb' is corrupt
In addition: Warning message:
In fetch(key) : internal error -3 in R_decompress1
Restarting R allows me to run ?myTestFunc and see the updated documentation.
How do I unload and reload the package "completely" without having to start R each time?
Thanks for your time!
PS - some output from sessionInfo(), incase it helps.
> sessionInfo()
R version 3.2.4 (2016-03-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

Resources