Github gpusvcalibration package installation in R - r

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)

Related

InstallationWarning: package 'XYZ' is in use and will not be installed: R

I am trying to install package SBCK from R build using Rscript build.R -c -v -i in windows command prompt following the steps given here. However, I ended up with package SBCK being not installed because of following error/warning InstallationWarning: package 'SBCK' is in use and will not be installed. I have no package with name SBCK installed on my system, so I do not understand why I am getting this warning message and thus not to be able to install the R package.
I know that similar question have been asked before here but solution there does not work in my case.
I am using R version 4.2.0 on Windows 10.
Once 'build.R' is run, "SBCK_0.5.0.tar.gz" is created in the 'SBCK-R' folder.
You can now install it via the package archive file option or pointing to that file in the install.packages command. I faced the same issue and this solved it.

Need help installing rJava on Mac

I am trying to download the package Xlconnect on my mac but I keep getting errors. I was able to figure out that it was because mac has some issue with Java and that I need to first resolve that before. But I've had no luck so far.
One of the things I tried was this: https://www.chrisjmendez.com/2018/11/16/installing-xlconnect-and-rjava-on-macos/
But it didn't work as well.
Can someone who has been able to successfully install rJava help me out please?
configure: error: One or more Java configuration variables are not set.
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.
If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.
ERROR: configuration failed for package ‘rJava’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava’
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/47/523c7yns0dvgc2cy147fbxrh0000gn/T/RtmpkLRoEh/downloaded_packages’
It seems as you have not set up your environment with java variables.
Try adding this to either your ~/.zshrc or ~/.basrc
export PATH={PATH_TO_JAVA_INSTALLATION}:$PATH
export JAVA_HOME={SAME_PATH_TO_JAVA_INSTALLATION}
Your Java Path is most likely in /Library/Java/JavaVirtualMachines/{some .jdk file}

Install own R package via function in R

When I build my own package in RStudio I click on "Install and restart" in the Build-tab. I'm wondering if I could do this via a function. I've seen that some code is running (meinpaket is the package's name):
Rcmd.exe INSTALL --no-multiarch --with-keep.source meinpaket
So I've tried the following:
system("Rcmd.exe INSTALL --no-multiarch --with-keep.source meinpaket")
I've tried it with shell, too.
I get the following error message:
Warning: invalid package 'meinpaket' Error: ERROR: no packages specified
You can zip your package (use the "build from source" command in RStudio to do the whole process including help and vignetts) and then install.packages() pointing to the zip file.

Can not install processr and procesR on Windows

Following this question, I am trying to install the package (running R64 as admin on Windows):
devtools::install_github("markhwhiteii/processr")
or
devtools::install_github("cardiomoon/processR")
However, I get the error message:
Error: Failed to install 'processr' from GitHub:
(converted from warning) cannot remove prior installation of package 'digest'
no matter which update option I select. Running the command .libPaths() I found the packages installation folder C:/Program Files/R/R-3.6.2/library and manually deleted the digest package and reinstalled it with package.install("digest"). But I still get the same error! I would appreciate it if you could help me understand what is the problem and how I can resolve it.
The simplest solution is to say no when install_github asks if it should replace digest.
If it still fails for some reason (and I can't see why; neither package requires a specific version of digest and you've reinstalled it in any case), then the problem is that devtools itself uses digest, so it can't be removed as long as devtools is loaded. So you can't use install_github.
You have a couple of options:
Clone the repo, then from the command line, run R CMD INSTALL . in that directory. Note that you'll need to insert the path to your R executable.
Install from the GitHub archive of the master branch: install.packages("https://github.com/markhwhiteii/processr/archive/master.tar.gz")
The steps to install the markhwhiteii/processr package:
install.packages("devtools")
library(devtools)
install.packages("https://github.com/markhwhiteii/processr/archive/master.tar.gz")
for testing the instalation:
library(processr)
processr::model1
Sent a PR on the GitHub repo.
and if you want to run R in the Jupyter environment just follow the instructions to install and regsiter the kernel:
install.packages('IRkernel')
IRkernel::installspec()

Installing R package from BayesTree_0.3-1.tar on Windows

I have installed R and Rtools, and set the path to both, but when I use
R CMD INSTALL C:\transfer\BayesTree_0.3-1.tar
to install this package, I get
Warning: invalid package 'c:\transfer\BayesTree_0.3-1.tar'
Error: ERROR: No packages specified
Do I need to rebuild this as a .tar.gz, or is there another problem?
Many thanks.

Resources