BaylorEdPsych Package for RStudio; Can't install package - r

I am trying to use the Littles Test out of the BayorEdPsych-Package to test for MCAR assumption.
For whatever reason though, my R can't find this package. Is it even still available?
My R Version: R 4.0.3 GUI 1.73
My R Studio Version: Version 1.4.1103
This is the error I get when trying to run install.packages().
The link to that side doesn't really help me.
Is there an alternative test for the MCAR/ MAR assumption? It's not a completely accurate test either way, but it would help me tremendously.
install.packages("BayorEdPsych")
Warning in install.packages :
package ‘BayorEdPsych’ 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
Thank you!

As #Zero Pancakes pointed out, BayorEdPsych isn't on CRAN anymore. I would recommend you use mcar_test from naniar package that provides an updated function for the same test. The documentation reads:
"Code is adapted from LittleMCAR() in the now-orphaned BaylorEdPsych package". Also, the naniar package is a wonderful package for missing data and it helps to be familiar with it.
You can find the function documentation here: http://naniar.njtierney.com/reference/mcar_test.html
Update:
The mcar_test function, for now, is only present in the development version of the package naniar. Install it like this:
# install.packages("remotes")
remotes::install_github("njtierney/naniar")
Or you can just source the function from the github repository:
devtools::source_url("https://github.com/njtierney/naniar/blob/master/R/mcar-test.R?raw=TRUE")

It was removed from the CRAN repository
There is an older version
How to install .tar.gz package in R
I've never installed a .tar.gz package before, but it seems possible
Also there is a MCAR function in the Colmp v1.0 package

BayorEdPsych isn't on CRAN anymore, but you can install the older verions I think.

Related

Install LiDAR Terrestrial Point Cloud Processing of Forest Data package does work

I try install TreeLS package, but i receive this message.
install.packages("TreeLS")
Message:
Installing package into ‘C:/Users/Matheus Pacheco/AppData/Local/R/win-library/4.2’
Warning in install.packages :
package ‘TreeLS’ 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
I found that the package is not present in CRAN anymore, and i try install from source, using:
install.packages("TreeLS", repos = "https://cran.r-project.org/src/contrib/Archive/TreeLS/TreeLS_2.0.2.tar.gz", repo = NULL, type="source")
But, some functions in the package, doesn't work.
I would be grateful if someone can help me. My final paper in PhD depends on it.
Thanks!
I'm afraid that if you're using a retired package, there is little help to get unless you try to fix it yourself. The question become too general.
But, some functions in the package, doesn't work.
Contact package developer, there is probably another package that include what you need, or his code might have been moved into some other package. He/She would know.
Perhaps someone can help you if you pull out the parts you need.
last resort (not recommend), downgrade to a compatible R version.

Running lasso: package ‘glmnet’ is not available (for R version 3.4.3)

I'm trying to run lasso. As far as I can see, glmnet is the most popular package. However, I'm unable to install it. Does anyone know why? I checked and this package was most recently updated in October 2019.
Alternatively, are there other packages you'd recommend for running lasso?
I've looked at the answers here and still can't figure out how to install glmnet.
How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
library(devtools)
install_version("glmnet", version = "3.0-2") #https://cran.r-project.org/src/contrib/Archive/glmnet/
Upgrading to the latest version of R (3.6.2) allowed me to download this package.

R package listed on CRAN but not in available package

I want to install a package that is listed in https://cran.r-project.org/web/packages/available_packages_by_name.html as available in CRAN, but when I check in R the install packages menu or the available.packages() command, I can't see the package there.
Do I need to do something different to install those packages? Why aren't those packages available?
The packages I'm interested on are WikipediR ( https://cran.r-project.org/web/packages/WikipediR/index.html ), WikidataR and WikipediaR.
If it matters, I'm using R 2.15.0 in Windows XP.
See the documentation for ?available.packages...
By default, the return value includes only packages whose version and
OS requirements are met by the running version of R, and only gives
information on the latest versions of packages.
In other words... your R 2.15 is likely too old for the package you are looking to download.
You can try to download the package source manually add the package to the package library usually found somewhere like "win-library/2.15/" but like Cory mentioned it is likely that the older version of R does not support the package build.
The advice given so far is a bit incomplete although I do agree you need to update your R version if you want to use these packages. Looks like they don't need compilation so you might have been able to either install from a local copy or drop R code in, but critically they depend on httr which requires R 3.0.0 or above. They were released only relatively recently, so there will be no Windows binaries from back in 2012. (Your copy of R is from 30-Mar-2012.) Look in the DESCRIPTION file which is presented in a nice web format at the CRAN/package listing:
https://cran.r-project.org/web/packages/WikidataR/index.html
Imports: httr, jsonlite, WikipediR
Suggests: testthat, knitr, pageviews
# only one version of these two
https://cran.r-project.org/src/contrib/Archive/WikidataR/WikidataR_1.0.0.tar.gz
https://cran.r-project.org/src/contrib/Archive/WikipediaR/WikipediaR_1.0.tar.gz
# pick one of these
https://cran.r-project.org/src/contrib/Archive/WikipediR/

How to force older packages to install on newer versions of R?

I cannot install proj4string into my current version of R (2.15.1):
Warning message:
package ‘proj4string’ is not available (for R version 2.15.1)
I assume this is because 2.15.1 is fairly new and the package just hasn't been updated. Is there a general mechanism for forcing R to install an older version of a binary package (realizing that there may be bugs that result)?
(upgraded from a comment)
Download the relevant package (zip, tarball, whatever) from the archives and install it locally, e.g.
install.packages("proj4string_x.y.z.zip",repos=NULL)
(this is not literal: x.y.z represents the package version)
sorry to bump this post again, but i had the same problem . then i found that I can use the following lines for the package:
install.packages("devtools")
devtools::install_github("slowkow/ggrepel")
replaced "slowkow/ggrepel" by the package and github repo.
What i noticed that many packages on github will have details to that. Hope that helps.
You can use install_version from the package devtools to install a specific package version.
To find the package version:
Search for the CRAN page of the package. E.g. for ggmap it is https://CRAN.R-project.org/package=ggmap
Check the archived packages. See heading "Downloads" and "Old Sources:"
Example code for package ggmap
devtools::install_version(
"ggmap",
version = "2.6",
repos = "http://cran.us.r-project.org"
)

rpart package installation in R

I am trying to install "rpart" package in R. But I am getting the following error.
> install.packages('rpart')
Warning in install.packages("rpart") :
argument 'lib' is missing: using '/home/sandeep/R/i686-pc-linux-gnu-library/2.11'
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘rpart’ is not available
Can anyone please tell whats the error about? How to solve?
A tip to start: If you're not sure whether you have a package already, you can use eg the function find.package() to check:
> find.package('rpart')
[1] "D:/R/library/rpart"
> find.package('lololool')
Error in find.package("lololool") : there is no package called 'lololool'
The problem is not so much that it is installed by default. It can be downloaded and installed from CRAN without problem using install.packages('rpart'), but if you check at the package page on CRAN, you see a very important line:
Depends: R (≥ 2.13.0), graphics, stats, grDevices
which tells you that it is only available for R 2.13 and following versions. From your error, I deduce you still run 2.11. Quite some packages are not available for that old R version from CRAN any more, so you better update your R. Otherwise you'll run into this problem more often.
Be aware that if you run Debian, you'll have to do a bit more effort, as the default R in debian is always outdated. Just in case, you find the directions to do that here.
I found that once I restarted RStudio that I was able to install the package and find.package() showed I did, now, have the packages.

Resources