installation - How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning? -


i tried install package, using

install.packages("foobarbaz") 

but received warning

warning message: package 'foobarbaz' not available (for r version x.y.z) 

why doesn't r think package available?

see these questions referring specific instances of problem:

my package doesn't work r 2.15.2
package 'rbbg' not available (for r version 2.15.2)
package not available (for r version 2.15.2)
package domc not available r version 3.0.0 warning in install.packages
dependency ‘rglpk’ not available package ‘fportfolio’
what when package not available our r version?
is bigvis package r not available r version 3.0.1?
package ‘syncwave’/‘mvcwt’ not available (for r version 3.0.2)
package ‘diamonds’ not available (for r version 3.0.0)
is plyr package r not available r version 3.0.2?
https://stackoverflow.com/questions/21580661/installing-predictabel-package-on-r-2-15-2
package bigmemory not installing on r 64 3.0.2
package "maker" not available (for version 3.0.2)
package ‘rtn’ not available (for r version 3.0.1)
trouble installing geor package
package ‘twitterr’ not available (for r version 3.1.0)
how install 'rcpp, package? got "package not available"
package ‘dataset’ not available (for r version 3.1.1)
"package ‘rhipe’ not available (for r version 3.1.2)"
https://stackoverflow.com/questions/31439092/package-dplyr-is-not-available-for-r-version-3-1-1

1. can't spell

the first thing test have spelled name of package correctly? package names case sensitive in r.


2. didn't in right repository

next, should check see if package available. type

setrepositories() 

see ?setrepositories.

to see repositories r in package, , optionally select additional ones. @ least, want cran selected, , cran (extras) if use windows, , bioc* repositories if [gen/prote/metabol/transcript]omics biological analyses.

to permanently change this, add line setrepositories(ind = c(1:6, 8)) rprofile.site file.


3. package not in repositories selected

return available packages using

ap <- available.packages() 

see names of r's available packages, ?available.packages.

since large matrix, may wish use data viewer examine it. alternatively, can check see if package available testing against row names.

view(ap) "foobarbaz" %in% rownames(ap) 

alternatively, list of available packages can seen in browser cran, cran (extras), bioconductor, r-forge, rforge, , github.

another possible warnings message may when interacting cran mirrors is:

warning: unable access index repository 

which may indicate selected cran repository unavailable. can select different mirror choosecranmirror() , try installation again.


there several reasons why package may not available.


4. don't want package

perhaps don't want package. common confused difference between a package , library, or package , dataset.

a package standardized collection of material extending r, e.g. providing code, data, or documentation. library place (directory) r knows find packages can use

to see available datasets, type

data() 

5. r or bioconductor out of date

it may have dependency on more recent version of r (or 1 of packages imports/depends upon does). at

ap["foobarbaz", "depends"] 

and consider updating r installation current version. on windows, done via installr package.

library(installr) updater() 

(of course, may need install.packages("installr") first.)

equivalently bioconductor packages, may need update bioconductor installation.

source("http://bioconductor.org/bioclite.r") bioclite("biocupgrade") 

6. package out of date

it may have been archived (if no longer maintained , no longer passes r cmd check tests).

in case, can load old version of package using install_version()

library(devtools) install_version("foobarbaz", "0.1.2") 

an alternative install github cran mirror.

library(devtools) install_github("cran/foobarbaz") 

7. there no windows/os x/linux binary

it may not have windows binary due requiring additional software cran not have. additionally, packages available via sources or platforms. in case, there may version in cran (extras) repository (see setrepositories above).

if package requires compiling code (e.g. c, c++, fortran) on windows install rtools or on os x install developer tools accompanying xcode, , install source version of package via:

install.packages("foobarbaz", type = "source")  # or equivalently, bioconductor packages: source("http://bioconductor.org/bioclite.r") bioclite("foobarbaz", type = "source") 

on cran, can tell if you'll need special tools build package source looking @ needscompilation flag in description.


8. package on github/bitbucket/gitorious

it may have repository on github/bitbucket/gitorious. these packages require devtools package install.

library(devtools) install_github("packageauthor/foobarbaz") install_bitbucket("packageauthor/foobarbaz") install_gitorious("packageauthor/foobarbaz") 

(as installr, may need install.packages("devtools") first.)


9. there no source version of package

although binary version of package available, source version not. can turn off check setting

options(install.packages.check.source = "no") 

as described in this answer imanuelc , details section of ?install.packages.


10. package in non-standard repository

your package in non-standard repository (e.g. rbbg). assuming reasonably compliant cran standards, can still download using install.packages; have specify repository url.

install.packages("rbbg", repos = "http://r.findata.org") 

rhipe on other hand isn't in cran-like repository , has own installation instructions.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -