Hi,
I have tried to install some packages (specified in the Coursera course that I'm working on it), example:
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("sva")
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("bladderbatch")
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("genefilter")
install.packages("snpStats", dependencies = T, force = TRUE)
BiocManager::install("snpStats", dependencies=TRUE)
and I get the same error again and again, like:
" BiocManager::install("bladderbatch")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for
details
replacement repositories:
- CRAN: https://cran.rstudio.com/*
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23 ucrt)
Installing package(s) 'bladderbatch'
installing the source package ‘bladderbatch’
trying URL 'https://bioconductor.org/packages/3.15/data/experiment/src/contrib/bladderbatch_1.34.0.tar.gz'
Content type 'application/x-gzip' length 9640937 bytes (9.2 MB)
downloaded 9.2 MB
Error: could not find function "install.packages"
Execution halted
The downloaded source packages are in
- ‘C:\Users\pc-17-\AppData\Local\Temp\Rtmpu0LXuS\downloaded_packages’*
Old packages: 'data.table', 'minqa', 'wk', 'cluster', 'commonmark', 'digest', 'foreign', - 'jsonlite', 'MASS', 'Matrix', 'mgcv', 'nlme', 'nnet', 'openssl', 'rpart', 'survival', 'sys',*
- 'vctrs', 'xfun', 'yaml'*
Update all/some/none? [a/s/n]: "
So, I uninstalled and installed the R program and Rstudio and I don't know what can I do to fix this error.