I am trying to install the tsDyn package on my Macbook Pro running MacOSX Catalina version 10.15.2. in RStudio (v.1.3.959), running R (v.4.0.1). I get the following error:
ERROR: compilation failed for package ‘mnormt’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/mnormt’
Warning in install.packages :
installation of package ‘mnormt’ had non-zero exit status
I tried installing 'mnormt' myself, as well as deleted all irrelevant packages manually to get rid of any possible older versions that may be interfering with the 'tsDyn' package, but nothing seems to be working.
The 'tsDyn' package seems to be installing otherwise, but I cannot call the function 'VECM' because it R states that it does not exist.
Any help would be much appreciated.
If you are using Anaconda, inside Environments search for "r-mnormt" and install from there. Also you can try inside RStudio:
install.packages("r-mnormt")
It should work now.
Related
I'm trying to install the semPLS package on my new MacBook but I get the error:
install.packages("semPLS")
Warning in install.packages :
package 'semPLS' is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
My RStudio is Version R Studio-2022.02.1 Build 461
I've also tried using the earlier version of R 0.99.486 but still have the same problem.
I've used this quite often in the past. It is only when I tried to install the package on my new laptop, that I can't.
I tried looking for the package on cran and cannot find it there. Any advice on how I can locate and install semPLS?
You can install it using the function install_github() from package "devtools"
install devtools:
install.packages("devtools")
library(devtools)
install semPLS:
install_github("cran/semPLS")
My first post in an early programming career - any help very welcome.
I am studying R, and using a book called R in Nutshell (O'Reilly). The book is supported by a package that was previously available on CRAN. The package on CRAN has been archived - it is still there though as nutshell_2.0.tar.gz.
I am running MacOS Catalina, R version 3.2.1.(after downgrading from 4.02 to try and solve this issue , without success), and RStudio version 1.3.1093.
When I try to install the package into R via RStudio I have this experience:
packageurl <- "https://cran.r-project.org/src/contrib/Archive/nutshell/nutshell_2.0.tar.gz
install.packages(packageurl,contriburl=NULL,type="source")
Warning in install.packages :
package ‘https://cran.r-project.org/src/contrib/Archive/nutshell/nutshell_2.0.tar.gz’ is not available (for R version 3.2.1)
I have a similar experience if I download the tar.gz file and try to import it directly under Tools/Install Packages.
I am able to install other packages on CRAN successfully.
Many thanks
Up front, I'm doing this on windows and not on macos, but the packages here have no compiled code so there should be few if any differences. Also, I tested on R-4.0.2; I don't think this will be a problem, because these packages appear to have been last-updated in 2012, so if they install on my 4.0.2, then they are likely to work on every version of R since then (including your 4+ year-old R-3.2).
download.file("https://cran.r-project.org/src/contrib/Archive/nutshell.audioscrobbler/nutshell.audioscrobbler_1.0.tar.gz", "nutshell.audioscrobbler_1.0.tar.gz")
download.file("https://cran.r-project.org/src/contrib/Archive/nutshell.bbdb/nutshell.bbdb_1.0.tar.gz", "nutshell.bbdb_1.0.tar.gz")
download.file("https://cran.r-project.org/src/contrib/Archive/nutshell/nutshell_2.0.tar.gz", "nutshell_2.0.tar.gz")
install.packages("nutshell.audioscrobbler_1.0.tar.gz", repos = NULL)
install.packages("nutshell.bbdb_1.0.tar.gz", repos = NULL)
install.packages("nutshell_2.0.tar.gz", repos = NULL)
I tried reproducing installation from archive. I got error that dependencies of this package are not available.
ERROR: dependencies 'nutshell.bbdb', 'nutshell.audioscrobbler' are not available for package 'nutshell'
* removing 'C:/Program Files/R/R-3.6.2/library/nutshell'
Warning in install.packages :
installation of package ‘D:/Profile/maszpa1/Desktop/nutshell_2.0.tar.gz’ had non-zero exit status
Did you get the same error? If yes, then did you try to install them and try again?
As per the accepted answer, the solution was to install the missing dependent packages first, then the Nutshell package.
I was then able to update to R4.02
audioscrobbler_1.0.tar.gz
nutshell.bbdb_1.0.tar.gz
nutshell_2.0.tar.gz
This is the code I have been running: (as suggested)
install.packages (c("devtools", "RcppArmadillo", "CompQuadForm", "doMC",
"foreach", "Matrix", "BiocManager", "testthat"),
repos = "http://cran.r-project.org/")
BiocManager::install(c("SeqArray", "SeqVarTools"))
devtools::install_github("hanchenphd/GMMAT")
I receive the subsequent messages in my console:
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘GMMAT’ Do you want to attempt to
install these from sources? (Yes/no/cancel)
Enter: YES
And then:
ERROR: compilation failed for package ‘GMMAT’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/GMMAT’**
I have attempted to uninstall and re-install R-Studio and R-console, have updated the platforms, installed any necessary packages for R/Macbook, etc. and still cannot seem to fix this issue. Currently using a Macbook so domc is not the issue.
Any help you guys could provide would be great!
I had recently posted a question about a unicode display issue linked here. The problem then was the 'cli' package bug in the version cli v2.0.0. This bug had been brought up and has been solved on the master branch on GitHub by the developer. I am trying to install the same using remotes::install_github("r-lib/cli"). RStudio connects to GitHub fine, downloads the package, begins installing it, goes onto the step for building the package and then returns an error. The error message is copied below:
Error: (converted from warning) Setting LC_CTYPE failed, using "C"
Execution halted
Error: Failed to install 'cli' from GitHub:
(converted from warning) installation of package '/var/folders/n0/__v02y5j02sby1w2_39185sh0000gn/T//Rtmp5HnvTL/file865408954cc/cli_2.0.0.9000.tar.gz' had non-zero exit status
Session information:
R version 3.6.1
macOS Catalina
Steps taken to solve the problem:
1.Have tried using the 'devtools' package to do the same; Same error message
2.Have reinstalled the Xcode developer tools on the system
3.Tried removing and reinstalling 'cli'. I can install from CRAN with the same bug in it; still cannot install from GitHub repo.
Any thoughts would be appreciated.
The same commands worked when I ran them in R console through terminal as superuser (sudo R from terminal). The packages compiled properly and installed.
Two pages which helped are linked below:
[Installing a package inside RStudio fails on macOS Catalina
[https://support.rstudio.com/hc/en-us/articles/200554786-Problem-Installing-Packages]
I am using R version 3.0.3.
I would like to install the package "imputation". I would like to re-run an analysis I used last year in R version 3.0.2.
I also have a new computer so I am re-installing my packages. I would like to install the package "imputation".
install.packages("imputation")
However, I received the following error:
Installing package into ‘\\oxdc/userdata/jolyon.faria/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘imputation’ is not available (for R version 3.0.3)
How can I work around this problem? I thought I could perhaps run two versions of R on the same computer but this may throw up its own problems.
Always check CRAN for package problems:
http://cran.r-project.org/web/packages/imputation/
You might be able to get it working on 3.0.3 or later by installing from source via the source archive.
Or contact the maintainer and ask them if they can fix the problem that caused the removal from CRAN.