R 패키지 설치시, 중복 설치 방지

2019. 5. 12. 21:19꿀팁 분석 환경 설정

728x90

패키지를 설치하다보면, 중복되게 머가 설치된지 몰라서 중복되게 설치하는 경우가 있다.

오늘 우연히 좋은 코드를 알게되서 공유하려고 한다.

required_CRAN <- c("R6", "glassoFast", "Matrix", "Rcpp", "RcppArmadillo",
                   "nloptr", "igraph", "grid", "gridExtra", "dplyr",
                   "tidyr", "ggplot2", "corrplot", "magrittr", "devtools")
not_installed_CRAN <- setdiff(required_CRAN, rownames(installed.packages()))
if (length(not_installed_CRAN) > 0) install.packages(not_installed_CRAN)

https://github.com/jchiquet/PLNmodels?fbclid=IwAR0A0-3462JaC5ukOD0kJCKIksKLzVC4cftYC6q8IYZ8bqYjSUMyzEASLUo

 

jchiquet/PLNmodels

A collection of Poisson lognormal models for multivariate count data analysis - jchiquet/PLNmodels

github.com

 

먼가 해당 패키지도 써볼일이 있지 않을까?

일단 Keep해둔다.

728x90