Discrepancies between R-package on github and install_github install - r

I am working on my package, which is hosted on github, using Visual Studio Code (1.67.1). I am using github desktop to push changes to the repository on github. This process works well. However when I re-install my package using:
library(devtools)
install_github("Ellesaere/tkis.package", dependencies=TRUE, force=TRUE)
I often find that an older version is installed, even though the github repository shows the correct version. I cannot figure out what makes it work, or not work. This is getting extremely frustrating, as I continuously find myself restarting R, reinstalling the package, hoping that it installs the correct version this time.
I was wondering if anyone could give some reasons why this could be happening.

Related

Using R, how to install github library without `devtools`

Let's say I wanted to install a library off of github without devtools. How would I do that?
I was helping a student in office hours today, and devtools required a lot of dependencies. It took nearly a half-an-hour just to get him ready to use it. I know that install.packages works for local files, is the github setup going to enable this?
Let's say: https://github.com/laresbernardo/lares
I understand that devtools::install_github is just a wrapper for remote::install_github which explains some of the dependency issues with these packages (and tidyverse in general - haven was broken today for Windoze).
Can I not install a package directly using install.packages from R:base using the remote source?

metaMS and xcms for R Studio suddenly throwing errors

I've been working with a script that utilizes metaMS and xcms to look at GCMS CDF files. The script, I'm assuming, is fine, because I literally only changed a database file before it started throwing errors.
I have since changed the database file back to what it was before, tried earlier iterations of the script, reinstalled both R and R studio and subsequently reinstalling BiocManager to reinstall metaMS and xcms, but to no avail.
It's having particular trouble with MSnbase and rtools, saying I need rtools to install packages, but that rtools is not compatible with my version of R (I'm using R 3.6 and R Studio 1.2.1335 - I am open to updating but this often causes issues with certain packages so I'm trying to avoid that).
I even tried to run as administrator to reinstall, and it's still not working.
I'm including images of the various errors I've encountered.
If you have ANY ideas I am open to them. I am at a complete loss.
P.S. I am definitely installing the dependencies. I've tried installing via command line and through the installer.

(More) DeclareDesign R Package download problems

I asked a similar question a couple months ago, but the package, website, and code in question have since been updated and the solution I used previously is no longer effective.
The issue is that I am unable to install a particular package in R.
The new code provided for installation of the DeclareDesign package is as follows (source):
install.packages("devtools")
devtools::install_github("DeclareDesign/DeclareDesign")
I've provided a screenshot of the error that I get when I try to run the above code. It looks to me like the problem is with the included 'estimatr' package, which apparently then causes the entire installation to fail.
How do I get this to work?
Your installation failed because devtools is trying to install estimatr from source, but you don't have the appropriate toolchain available to build it.
DeclareDesign now has a drat repository with pre-built binary packages for Mac and Windows, which should obviate the need to install Xcode or Rtools.
install.packages("DeclareDesign", repos="http://r.declaredesign.org")
DeclareDesign is now on CRAN, so you can install via
install.packages("DeclareDesign")

RStudio and devtools do not install static vignettes

I created an R package for an introductory course in remote sensing with R (github link) and want to provide the handouts as as static PDF vignettes (copy protected) as described here. With the standard Linux commandline "R CMD build FEglobaleOekologie && R CMD INSTALL FEglobaleOekologie_0.0.1.tar.gz" everything works fine. However, when I install it from within my RStudio project or under MS Windows with devtools::install_github" there are no vignettes. The later one is the target platform, where I would like to have them.
Sadly I could not find any thread, that solves my problem. Can anyone tell what's going wrong here or what I am doing wrong?
I've run into problems like this, too. I've found that build doesn't always build my vignettes (that generally happens with using build in the RStudio menu, since I believe that doesn't include the vignettes by default ). You might want to try also running build_vignettes() before uploading to GitHub; and when installing from GitHub, explicitly including build_vignettes = TRUE in the install_github function. Otherwise, you may have a path issue for the installed package.

Package installation issues with R 3.1.0

My Fedora system (Fedora 20, all up to date) has just had R updated to version 3.1.0. Since then, I've had issues installing multiple packages. glmnet failed previously, and now I'm having trouble with treemap. More specifically, I get an error during treemap installation that httpuv has zero exit status.
I never had issues with the previous version of R. Any reason this version should have such problems??
There could be many causes to do with your OS, version, permissions, other installed packages/software, etc, etc. Without seeing the full error message it's hard to know.
One possibility specific to httpuv is root privileges. I've noticed a few threads on various forums when searching for installation errors with this package and Linux, many of them mentioning root v. non-root issues. In another case, libuv needed to be upgraded.
I encounter package installation problems daily and I have some more general work-arounds as well. Hopefully one of these will solve your problem.
Install the package from source
download.file(url="http://cran.r-project.org/src/contrib/httpuv_1.3.0.tar.gz", destfile = "httpuv.tar.gz")
install.packages("httpuv.tar.gz", type = "source", repos = NULL)
Install using devtools via GitHub if the package supports it
Install RTools and re-try your package installation
Install an older version of the package
If those above do not work, then I dig deeper by referring to advice given to me by a VP of IT in my company. These comments were made in reference to frequent package installation problems I encountered when switching from Windows to Solaris:
There are two types of install/make problems. Missing .h files
and/or missing .so/.a libs. The reason for these are multiple:
1.- the package that delivers these is not installed. This means that those files cannot be found anywhere in the /usr tree. Solution is
install right package, make sure the files are there
2.- the includes are not found by the install configurator. This means some environment variable or install option is not properly set (this
is our case for RODBC). Figuring out which variable to set is
challenging without looking at the package documentation [fortunately, documentation is not hard to find!]
3.- the libs are not in the LD_LIBRARY_PATH, easy to fix.
4.- There is a deeper compile/link error, meaning the package is not compatible with the rest of the sw, or has not been properly ported.

Resources