Trouble installing and opening “MAMI” package in R - r

I’ve downloaded the “MAMI” package in R but even though it’s downloaded, when I go to open it from my library, it tells me “Error in library(MAMI): there is no package called ‘MAMI.’” I had trouble downloading it as well - when I tried to download it with just “install.packages(“MAMI”)” R kept telling me “package ‘MAMI’ is not available for this version of R” so I went to the developer’s website (https://mami.r-forge.r-project.org/) and just downloaded it using the installation code there. Can someone tell me how to either redownload it in a way that will work or how to open it from my library?

Related

HOW can we create xlsx file and write xlsx file in R? [duplicate]

I am relatively new to R/RStudio. I was successfully able to install packages until today. Each time I try to install a package, I receive the following error:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/my. Name/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/openintro_1.7.1.zip'
Content type 'application/zip' length 3136068 bytes (3.0 MB)
downloaded 3.0 MB
Rtools is already installed on my machine, so I'm not sure why it's not being recognized.
I have tried un-installing and re-installing rtools but can't seem to resolve the issue. Any insight here would be greatly appreciated!
The message indicates RTools isn't installed properly. Download and install it like so:
Go here
Download rtools
Find the file that just downloaded
Double click on it to start installation
Close and reopen RStudio
Everything should work now!
A nice 2-minute video explainer can be found here.
Why is RTools necessary in the first place?
Rtools is a collection of software you need to be able to call R from the command line on Windows. You need to be able to call R from the command line to build and install packages from source code. Most packages will also require the program pdflatex.
If you have installation problems
Re-install R. Try to stick to the default installation settings if possible. Don't forget to close all current R sessions before reinstalling, then start a new R session and see if it works as expected. If not, try downloading and installing Rtools as outlined at the top of this answer; hopefully it installs as expected now.
Make sure your anti-virus software isn't preventing it being installed. Anti virus software can sometimes mistake it for something harmful and quarantine it.
When reinstalling R, or when installing Rtools manually, be careful to look for any indication that you do not have write permissions to the drive you're installing to. If you don't have permission to install certain things, that may be what's causing Rtools to not install correctly. This is more likely to happen if there are multiple users on your Windows computer, or if your organisation has strict policies about what can be installed. To look into this, figure out where Rtools is being installed to, and ensure you have the ability to write to that folder.
if your os is windows, you should install rtool to create a building env for some R packages.
full stack for install R Rstudio Rtool .
you can get answer from this video https://www.bilibili.com/video/BV1Mv411u7Cm?spm_id_from=333.999.0.0

Difficulty installing a package in R linux, dalton_rqi

Downloaded package from below URL.
Attempted to install using below command; response shown.
library(dalton.rqi,lib.loc='/home/X/Desktop/')
Error: package ‘dalton.rqi’ was built before R 3.0.0: please re-install it
https://my.clevelandclinic.org/departments/anesthesiology/depts/outcomes-research/risk-quantification
It appears this is a compiled package that maybe I don't have the source for? Is there a way to force install of the package? I'm unable to install using Rstudio GUI in its current form as a zip. Tried repackaging to tar.gz has Rstudio was looking for and also had a non-zero exit status error.
Any ideas?
I'm afraid this can't be achieved directly. The error message says it well: to use a package in R it needs to be built on an R version matching yours.
I can suggest two ways to move forward:
Contact the authors, ask for the R sources (it is somewhat surprising they did not make them available in the first place), and build the package yourself.
Downgrade your R version as far back as needed to match the one this pre-built package used.

Install R packages outside R

So the thing is my IT department is scared of R and therefore only allows us to use it on a laptop that can't go online. Therefore they are the ones to install packages on it.
But due to covid I'm at home discovering they didn't install the requested packages. So I'm looking to see if there is a way to download these packages on a laptop with internet access, add them to an USB and then install them from the USB in R?
Quite easy, just download the package from the CRAN site e.g. https://cran.r-project.org/web/packages/imputeTS/
You can either download the "Package source" or the "Binaries" (must be your operating system.
If you are using R Studio, there is then even a menu item for installing the package - just select the file you downloaded and here you go.
If you are not using R Studio, just provide the path to your downloaded archive in the install.packages command.
The only problem is, you also need all the dependencies ...;)
So you ideally already have them and just one package is somehow missing - otherwise this can get quite time consuming to download all the dependencies - because the dependencies itself also usually have dependencies themselves...
In this case the miniCRAN solution Roland linked in the comments might be an idea. ( Offline installation of a list of packages: getting dependencies in order ) But didn't try the miniCRAN myself yet - would be interested how good this actually works.

I am unable to use install.packages with the pkgs parameter to install a package from a local file (Win8.1, R3.10)

I am trying to install the rClr package. The instructions for this are to copy the package file onto the local computer and use install.packages(pkgs = "c:/.../rClr_0.5-2.zip"). I have a laptop, a server and a desktop. The laptop and the desktop are Windows 8.1, the server Windows 2012. All run R 3.1.0. The desktop installs rClr without a problem. The other two return the warning (error) message:
package ‘c:/.../rClr_0.5-2.zip’ is not available (for R version 3.1.0).
I've tried all obvious things. The error is pretty generic, it is given whenever install.packages can't find a file. The package is compatible with R 3.1.0, as evidenced by the fact it installs on my desktop. I've check for silly mistakes. I've tried moving the file to simpler directory structures (in case install.packages had a problem with spaces or special characters), I've given it maximum file permissions, tried playing around a few other things, but nothing makes a difference. I also tried replacing the local reference with a reference to the http link, and tried download another random package from CRAN to see if that would install, and both gave the same error message. I can't think of anything different in the environment of the laptop and the desktop. install.packages does work when installing the standard packages from CRAN.
Am I missing something obvious? Is there any known issue with install.packages (I thought maybe security but couldn't find anything on internet)? Are their ways to force an installation? Can anyone recommend something else to try?
Thanks.

Unable to install and run a package in R (windows)

I am working on a 64 bit windows system. And I have a 64 bit, 2.15.1 version of R installed in it. I am trying to install a package called "MethLAB" from the package menu, by selecting its local zip file from the "Packages" menu. However I am running into an error show below.
> utils: : :menuInstallLocal ()
package 'MethLAB' successfully unpacked and MDS sums checked
> library(MethLAB)
> MethLAB()
Warning message:
In file (filename, "r", encoding =encoding) :
unable to resolve 'bioconductor.org'
So the above is what i get when i try to run it. Can anyone help me with its proper installation and running ?
I suspect it is because you are not connected to the internet. Is that so? If it is then you should contact the people that wrote the package; it seems the software is trying to contact BioConductor for some reason, perhaps to download additional packages/functionality etc. To that end, make sure you have installed all the pre-requisite packages needed to run `MethLAB.
Do note that this is a warning only, not an error. Whether this stops the package from working or not is a different matter. Again you should take this up with the developers if you have followed all the instructions on how to install and use the package.

Resources