Can I use package 'imputation' in R version 3.0.3? - r

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.

Related

R package bizdays cannot be installed

I have been using bizdays package for a long time and since I changed my window installation recently I had to install all of the packages for R. The only package that is not installed is bizdays. The documentations appear to show this package should be still on CRAN, but I cannot find it or install it. Is there any way to somehow install it back?
This is the error I am getting:
install.packages("bizdays")
Installing package into ‘C:/Users/me/OneDrive/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)
So it seems the package got installed, and when I try to use it this is the error thrown:
library(bizdays)
Error in library(bizdays) : there is no package called ‘bizdays’
You may need to update R to =>4.0
You can check with R.version.
Needing to update R is a fairly common cause of package install problems, as packages can use new R features. You will need to restart RStudio

Installing zeligverse in R 4.0.2

I'm trying to use plot.ci function in the zelig library but apparently Zelig is not supported with R 4.0.2. I'm trying to see if there is a work around to access these functions or if I just can't use this library until they make the appropriate updates. Please help.
Ethan
Error message below:
> install.packages('zeligverse')
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/ethan/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘zeligverse’ is not available (for R version 4.0.2)
It looks like this package has been removed from CRAN's repository, meaning you can't install it like this anymore - you have to install it manually. This is explained on their website, and has download links for manual installation that have been archived:
https://cran.r-project.org/web/packages/zeligverse/index.html
You will also have to install the following dependencies (packages it requires) to install it correctly:
'Amelia', 'MatchIt', 'WhatIf', 'Zelig', 'ZeligChoice', 'ZeligEI'
The Zelig package that is currently available appears to support the function you mentioned. You can install it with:
install.packages("Zelig")

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

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.

RMySQL package not available for R 3.1.0. What else can be used?

I was trying to use a package to connect R and MySQL to run stats on a database in a local environment. It seems like the package "RMySQL" is not available for the current version of R.
Following is what R spit out:
install.packages("RMySQL")
Installing package into ‘C:/Users/xxxx/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
package ‘RMySQL’ is available as a source package but not as a binary
Warning in install.packages :
package ‘RMySQL’ is not available (for R version 3.1.0)
Two quick questions:
What is the difference between source package and binary?
Is there another package available that does the same job and is compatible with R 3.1.0?
I would really appreciate your help!
Please, read http://cran.r-project.org/bin/windows/contrib/3.1/ReadMe:
Packages related to many database system must be linked to the exact
version of the database system the user has installed, hence it does
not make sense to provide binaries for packages
RMySQL, ROracle, ora, TSMySQL, dbConnect
although it is possible to install such packages from sources by
install.packages('packagename', type='source')
after reading the manual 'R Installation and Administration'.
Since RMySQL requires compilation, you need the Windows toolset.

Resources