I would like to build an R package from a github repository for an older version of R:
https://github.com/suiji/Arborist/
The R package is actually Rborist, so not sure whether to clone the whole repo mentioned above?
I installed Rtools after miserably failing to run:
library(devtools)
install_github("https://github.com/suiji/Arborist/tree/master/Rborist/src")
or:
library(devtools)
install_github("suiji/Arborist")
What do I have to do to build this package please?
I am trying to build my first R package (GitHub link). It is currently passing all local checks with devtools::check(), but failing on Travis:
ERROR: dependency ‘Rmpfr’ is not available for package ‘streamDepletr’
Looking at the Installed package versions section of the travis-ci output, Rmpfr is not listed. However, my DESCRIPTION file includes it as an import:
Imports:
Rmpfr,
dplyr,
magrittr
and Rmpfr is available on CRAN; my question is, how do I get travis-ci to install it?
The solution may be related to this previous question where the author had to include Java in their .travis.yml file. For Rmpfr, it looks like the MPFR C library is necessary. Is there a way to instruct travis to install this library in my .travis.yml file? Or am I barking up the wrong tree?
As you found out, you need the libmpfr-dev package to be installed. You can do this by adding
addons:
apt:
packages:
- libmpfr-dev
to your .travis.yml. See the documentation for reference.
I was building an R package on https://travis-ci.org/ and got an error:
The command "tlmgr update --self" failed and exited with 25 during .
The last lines of Travis CI output:
When I call devtools::check() locally on Windows 10 in RStudio no errors nor warnings arise.
I found that tlmgr concerns with LaTeX/TexLive packages, and In Travis CI documentation "Building an R Project" it's written that some LaTeX/TexLive may be need to be installed if vignettes require. (Note: there are no vignettes in my package yet.)
Configuration in .travis.yml file:
language: R
sudo: false
cache: packages
r_github_packages:
- jimhester/covr
after_success:
- Rscript -e 'covr::codecov()'
My question: what is the cause of the problem and how to solve it?
It seems that tlmgr can't accessing the current repository, you can rollback the repository to the archived version with:
tlmgr option repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final
which gaves
tlmgr: setting default package repository to ftp://tug.org/historic/systems/texlive/2015/tlnet-final
Source: A little trick with tlmgr: Unknown directive …containerchecksum error
I am trying to install a package called gpusvcalibration from Github.
library("devtools")
install_github("mfrdixon/gpusvcalibration")
And I get the following error:
Error: Command failed (1)
Anyone know what is going on?
Have you read the installation instructions from the repo and followed them?
Clone the repository and then
Modify the R_EXE and R_INCLUDE variables in the Makefile
R CMD build gpusvcalibration
R CMD check gpusvcalibration
R CMD install gpusvcalibration_0.0-1.tar.gz
install.packages('gpusvcalibration_0.0-1.tar.gz', repo=NULL)
I was trying to install RTextTools package for R, but failed. Here is the output from the screen
> > install.packages("RTextTools")
Warning in install.packages("RTextTools") :
argument 'lib' is missing: using 'C:\Users\datamining\Documents/R/win-library/2.10'
--- Please select a CRAN mirror for use in this session ---
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.10
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘RTextTools’ is not available
What's the reason for this problem, and how to fix it? Thanks.
There are two distinct, but related, issues:
You are running version 2.10 of R which is two years old. CRAN supports only the current version with pre-built binaries. You could try installing from source.
RTextTools, as can be seen on its CRAN page also requires at least R version 2.13.
So in short: you should upgrade.
I have resolved the issue. I have Download RTextTools From Given Link.
https://cran.r-project.org/src/contrib/Archive/RTextTools/
and copy RTextTools_1.4.2.tar.gz file in project root folder then run this command in project folder in terminal
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
After running this command I receive below error
"ERROR: dependencies ‘SparseM’, ‘randomForest’, ‘tree’, ‘e1071’, ‘ipred’, ‘caTools’, ‘maxent’, ‘glmnet’, ‘tau’ are not available for package ‘RTextTools’".
Now install each dependencies from RStudio or RConsole (Any Editor used by you) by simply running this code.
install.packages("caTools").
Install all 9 required packages One By One (In My Case it was 9 Packages Dependencies required by RTextTools) all packages will be installed except 'maxent'.
Now download maxent from the given link.
https://cran.r-project.org/src/contrib/Archive/maxent/.
and copy maxent_1.3.3.1.tar file in project folder then run this command in project folder in terminal.
"R CMD INSTALL maxent_1.3.3.1.tar"
Now For RTextTools Run this command again in Terminal.
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
All is done Now..
But the Last Step is
Load the RTextTools using.
library(RTextTools)
You will see one more Error: Load SparseM Now Loading SparseM use code below.
library(SparseM)
and in the last Load RTextTools
library(RTextTools)
RTextTools is dependent on a number of packages, most of which require R 2.13+. You should always keep R updated to the latest version, since each update contains numerous bug fixes and performance enhancements.
If you can't install packages from repository or the packages are not available anymore, just follow this steps:
Install.packages("devtools")
check -- library("devtools")
install_github("cran/maxent")
install_github("cran/RTextTools")