R installation problems - Onedrive and Rattle - r

I'm trying to install Rattle and am having problems installing RGtk2. I am using R version 4.1, so there may be a version compatibility issue. However, I noticed that RStudio is installing packages into OneDrive:
Installing package into ‘C:/Users/tdwri/OneDrive/Documents/R/win-library/4.1’
but I am using R in C:\Program Files\R\R-4.1.2\
Question 1: how do I make sure packages are installed in C:\Program Files\R\R-4.1.2 instead of OneDrive?
Question 2: How do I install rattle when I am getting the error:
package ‘RGtk2’ is not available for this version of R.
Question 3:
If the solution to the second question involves downgrading the R version, how can I do that?
I apologize for asking 3 questions. I'm trying to get Rattle to work and these problems came up.

I found an answer to this at https://rattle.togaware.com/
LATEST NEWS: RGtk2 Retired From CRAN December 2021
RGtk2 appears to have been retired from CRAN. To install it from the Microsoft CRAN snapshots:
This worked to get RGtk2 and install rattle
install.packages("https://cran.microsoft.com/snapshot/2021-12-15/bin/windows/contrib/4.1/RGtk2_2.20.36.2.zip", repos=NULL)

This worked- in addition don't forget to find file move it and resave it in the file you need it in.
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/carar/OneDrive/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)

This worked for me on Mac OS
From this link
https://cran.r-project.org/bin/macosx/
I Installed lower version of R
I installed rattle library
Upgraded my R to latest version and everything work fine

Rattle was archived on CRAN recently but after an update is being unarchived.
This may take a day or so.
In the meantime the following should work:
install.packages("rattle", repos="https://rattle.togaware.com", type="source")
I just checked and it worked for me.
Also RGtk2 has been archived on CRAN though the author indicates it is remains functional.
Yes, please follow the instructions at https://rattle.togaware.com to install RGtk2 from MRAN instead.
install.packages("https://cran.microsoft.com/snapshot/2021-12-15/src/contrib/RGtk2_2.20.36.2.tar.gz", repos=NULL)

Related

Can't install package 'nutshell' from O'Reilly book 'R in a Nutshell' onto Mac

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

Forecast package not working on Databricks (R-version 3.5.2)

I installed the 'forecast' package in a Databricks environment a few days back. It was working fine until this morning when I restarted the cluster. Now, I can't install the package anymore. Could someone help with this?
Have already tried upgrading the current R version (3.5.2) to the latest (3.6.0). That would require upgrading the current Ubuntu version too, which I don't think is possible, since that is the version Databricks is linked to. If there's a way to upgrade the Ubuntu version as well, do let me know.
Here's a screenshot of the error:
FROM THE SCREENSHOT, The 'quadprog' latest version 1.5-5 supports only >= R-3.6 version as yours is R-3.5.2, I would suggest you to download old binaries from CRAN for quadprog and install (refer Install previous versions of R on ubuntu)
After installing quadprog, go for the other packages installation. If same error persists, please repeat above step for that packages too :)
If you are trying this operation through R Console, you can use
packageurl <- "https://cran.r-project.org/src/contrib/Archive/quadprog/quadprog_1.5-4.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

Trying to install tm package in R but it fails

Trying to install tm package in R but I get the following error.
Installing package into ‘C:/Users/resmim/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) also installing the dependency ‘slam’
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘slam’ ‘tm’ These will not be installed
Type this in your console:
chooseCRANmirror()
And choose your CRAN Mirror. I like Spain :). Then try re-installing your package.
In addition to trying your luck with a few different mirrors, be sure to answer 'N' when asked 'Do you want to install from sources the package which needs compilation?' This solved the problem for me.
update r version to latest, it just worked for me.
to do this, download latest version of R from cran and install it. no uninstall required for previous versions.

Error in installing packages from RStudio

I have been trying to install the package "doby" from RStudio (ver 0.98.501 ) on ubuntu 13.04 but it keeps throwing the following warning and the package does not get installed.
Warning in install.packages :
package ‘doBy’ is not available (for R version 2.15.2)
I have followed all the instructions given here :
http://www.r-bloggers.com/installing-r-packages/
Can someone please suggest where I might be going wrong ?
If you are on Ubuntu, please see this README for Ubuntu from CRAN --- it will allow you to get to the current version of R (today 3.0.2, in a few days 3.0.3) with mininal effort.
Once you have a current R version, getting the doBy package (which depends on it) installed is a piece of cake too.
If however you prefer to stay with your version of R, you can manually fetch an older version of doBy from its CRAN archive. Download to, say, /tmp and run R CMD INSTALLby hand on it.
From http://cran.r-project.org/web/packages/doBy/index.html, package doBy depends on R version 3.0 and above. Your R version is 2.15.2. You will need to install a later version of R, and then change the settings in Rstudio to target the updated version.

Unable to install ggplot2 on Ubuntu 11.10

I am getting the following error when trying to install ggplot2:
> install.packages("ggplot2")
Installing package(s) into ‘/home/dodo/R/x86_64-pc-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘ggplot2’ is not available (for R version 2.13.1)
I am running Ubuntu 11.10 (oneiric).
Any help is appreciated.
You need R (>= 2.14.0) for this version.
So please go and see the instructions at CRAN to upgrade on Ubuntu to the current R and once you have R 2.14.2 up and running (which is a matter of four or five commands, thanks to the magic of apt-get and friends, upgrade to the current ggplot2.
ggplot2-0.9.0 has an explicit dependency on R >= 2.14 (and an implicit one of R >= 2.14.1). Thus it can not be installed in R version 2.13.1. Perhaps you can get the previous version (0.8.9) from the archives and install that.
You need to install a version that is appropriate to your old version of R or you need to upgrade. To go the first route, you should find a version of ggplot2 in the Archives and then install from source (which is I believe the default for Linux). Perhaps try the UCLA CRAN mirror:
http://cran.stat.ucla.edu/src/contrib/Archive/ggplot2/ggplot2_0.8.9.tar.gz

Resources