Problem: Can't install.packages("packagename")

Hi everyone,

Please help me!

I am doing logistics regression model analysis (https://stats.idre.ucla.edu/r/dae/logit-regression/) and need to install the: install.packages("packagename")

However, I got the message:
Warning in install.packages :
package ‘packagename’ is not available (for R version 3.3.3)

I also try to install:
install.packages("devtools")
install_github("packageName")

but it still didn't work!

Please give me advice how to fix the problem!

Thank you!

Try upgrading to the latest R v.3.5.1

You can try to add quotation marks and make sure your package could support on your current R version, for example:

install.packages("aod")

I successfully installed "aod" package on the R 3.3.1. If this is the packages you are trying to install the same package, it should work fine for your R version.

If you want to install some open source software for bioinformatics from Bioconductor, please follow the instruction here.

## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
# Install specific packages, e.g., “GenomicFeatures” and “AnnotationDbi”
biocLite(c("GenomicFeatures", "AnnotationDbi"))
1 Like

Hi @Thienthanh!

install.packages("packagename") is just an example — you’re supposed to replace the packagename part with the name of the package you want to install. For instance, to install the package ggplot2 you would use:

install.packages("ggplot2")

Does that make more sense?

You are also running a rather old version of R (two years out of date). You will likely have an easier time installing packages if you update R to the latest version (3.5.1).

2 Likes

Thank you so much @jcblum and @raydai :blush: Your advice are very useful and it helps me a lot!

My problem is solved and I also successfully update R to the latest version! :grinning:

All the best,

1 Like

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.