Update Blues: install.packages("XXX") - r

So I recently (1 hour ago) updated to a 64-bit version of R and tried installing some of my trusty packages in the fresh install (Windows seperates 64/32 bit programs now in two program folders).
Is there a work around for this?
Warning message:
In getDependencies(pkgs, dependencies, available, lib) : package ‘RMySQL’ is not available

Got it sorted. Download and install manually:
install.packages("C:\\Path\\to\\file\\windows_binary.zip",repos=NULL)
Happy Friday!

Related

Most recent terra package for R will not compile

I am trying to install the newest version of the terra package, but I keep getting the following errors:
no DLL was created
ERROR: compilation failed for package 'terra'
* removing 'C:/Users/ruben/AppData/Local/R/win-library/4.2/terra'
* restoring previous 'C:/Users/ruben/AppData/Local/R/win-library/4.2/terra'
Warning in install.packages :
installation of package ‘terra’ had non-zero exit status
I don't know if this is my fault or if there is something not right with the package or compiler. Any help on this would be great.
To install the CRAN version from source, you need to install the system dependencies (on OSX and Linux) or, on windows, have the current version of Rtools installed.
On OSX and Windows, you can choose to not install from source. To get the latest released version you would have to wait a couple of days until CRAN has a compiled ("binary") version available for your R version and operating system.
Another way to use a recent version of "terra" on windows is to get the development version from the R-universe:
install.packages('terra', repos='https://rspatial.r-universe.dev')
For more info on installation go the terra github site

Why is install.package() - building the package from scratch?

I installed RStudio and R recently on a new laptop
I installed RTools after I noticed that my "packages" (it's source code) - was being downloaded in a temp. folder under "Users...\AppData\ etc. and I couldn't find the actual package and use them.
The RTools then builds the package from source - I think
This did not happen with my earlier RStudio and R isntalls. The packages were downloaded "cleanly" - I don't remember it going to through the source code build process
> install.packages("caret")
also installing the dependencies ‘nloptr’, ‘lme4’, ‘pbkrtest’, ‘car’
Packages which are only available in source form, and may need compilation of
C/C++/Fortran: ‘nloptr’ ‘lme4’ ‘caret’
Do you want to attempt to install these from sources?
When I say 'y' to this question - it builds it all right.
Versions:
OS: Windows 10
RStudio: 0.99.903
R: 3.3.1
(P.S. I have not been able to install the 'caret' package, the others I could going through this process.)
this worked for me:
I installed the package directly from the windows binary zip file:
LINK <- "https://cran.r-project.org/bin/windows/contrib/3.3/caret_6.0-71.zip"
install.packages(LINK, repos =NULL)
The links to binaries were found at: https://cran.r-project.org/
See under Software > R Binaries

R-Studio on OSX can't load mosaic package

I am running OSX 10.10, R-Studio Version 0.99.484, and R version 3.2.2.
I just made a fresh install of R and R-Studio using the installers from their respective websites. I use install.packages to install "mosaic" and then I try loading it using library, but it gives me the following error:
library("mosaic", lib.loc="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
Error : object ‘dendro_data.hclust’ is not exported by 'namespace:ggdendro'
Error: package or namespace load failed for ‘mosaic’
I tried reinstalling ggdendro but nothing. Does anyone have any advice on how to deal with this issue?
I encountered this same error and seem to have somewhere along the way resolved it. Steps taken include:
cleaned out my libraries (local and System)
used Disk Utility to repair any odd permissions
reinstalled R
opened RStudio and imported package with dependencies from the repository:
> install.packages("mosaic", lib="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
console prompted me to choose the older precompiled package or the newer, I chose older
Do you want to install from sources the package which needs compilation?
y/n: n
mosaic loaded happily
> library("mosaic", lib.loc="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")

R Newbie Confused about Install Packages

I am somewhat new to R, and I thought I understood how to install packages from CRAN mirrors and from source files, but now I am stumped. I currently am using R 2.10.0 on a Windows 7 32-bit machine.
I want to try to use the RGoogleAnalytics package found here and am trying to follow the instructions. They instruct us to install both RCurl and the XML packages from omegahat. For example,
install.packages("RCurl", repos = "http://www.omegahat.org/R")
however this does not work, as I get the following error:
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘RCurl’ is not available
When I try this instead:
install.packages("RCurl", repos = "http://www.omegahat.org/R", type="source")
I get the following error after the file downloads. I previously had version 1.0 and that is restored.
trying URL 'http://www.omegahat.org/R/src/contrib/RCurl_1.5-0.tar.gz'
Content type 'application/x-gzip' length 735041 bytes (717 Kb)
opened URL
downloaded 717 Kb
* installing *source* package 'RCurl' ...
Warning in system("sh ./configure.win") : sh not found
ERROR: configuration failed for package 'RCurl'
* removing 'C:/PROGRA~1/R/R-210~1.0/library/RCurl'
* restoring previous 'C:/PROGRA~1/R/R-210~1.0/library/RCurl'
The downloaded packages are in
‘C:\Users\Brock\AppData\Local\Temp\Rtmpc9wt5N\downloaded_packages’
Warning message:
In install.packages("RCurl", repos = "http://www.omegahat.org/R", :
installation of package 'RCurl' had non-zero exit status
Without going into details, I haven't been able to use the RGoogleAnalytics package as I get the same error that is found in this post. I simply am trying to exhaust every possible option to get around the error.
Any help or insight you can provide will be greatly appreciated!
The RCurl project page on CRAN says the Windows binary is not available. The ReadMe points you to a page maintained by Professor Ripley, where he provides binaries of RCurl and several other packages that have special build needs on Windows. However, he only provides them for the most recent major revision of R, so you would need to upgrade to R-2.12.0 to install them from his page.
If you want to build packages from source on Windows, you need to install Rtools first. It looks like you haven't done that. Even if you had them installed, it will still require extra steps to build RCurl on Windows... else the Windows binary would already be on CRAN.
Your best bet is probably to upgrade R and install RCurl from Prof. Ripley's page.
You are probably missing the components to build packages under Windows:
http://www.murdoch-sutherland.com/Rtools/
According to RCurl FAQ, either
curl-config is not found in your path
or
curl-config and related devlopment libraries (libcurl) are not installed.

Can I use rattle on 64-bit R?

Trying to install rattle on a windows server 2008 R2 64bit machine, using 64-bit R ver2.11, I got the following message:
install.packages("rattle", dependencies=TRUE)
Warning: dependencies ‘RGtk2’, ‘rggobi’, ‘RSvgDevice’, ‘Biobase’, ‘multicore’, ‘marray’, ‘affy’, ‘snowFT’, ‘Rmpi’, ‘rpvm’ are not available
When I tried to install one of them:
install.packages("RGtk2")
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘RGtk2’ is not available
Finally I noticed this and this. Should I go back to 32-bit R in order to use rattle?
Thank you
I was trying to use Revolution R for Windowswith Rattle, was told currently RGtk2 is not available on 64 bit, but the next release (in April or so) will support it
Why not 64-bit Linux?

Resources