일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 심리학
- 곤줄박이
- 영화 일기
- 철학
- 영화 리뷰
- 둠칫새
- R
- 계묘년
- 파이썬
- 토양미생물학
- 코딩
- 생물정보학
- RStudio
- mushroom #mushrooms #mushroomhunting #mushroomphotos #mushroomphotography #mycology #mycologist #fungi #fungalecology #fungaldiversity #fantasticfungi #버섯 #탐균 #버섯탐사
- Cannon PowerShot G7 X Mark III
- 갓생
- 외생균근균
- 생명과학 균학 미생물학 Biology Mycology Microbiology
- 영화 후기
- 대학원생
- 영화 해석
- 에리히 프롬
- 더 웨일
- 탐조
- 젖비단그물버섯
- 바운새
- 토양학
- Rstuido
- 청도요
- 영화
Archives
- Today
- Total
워라밸 중독자
[R] 사용자 설치 패키지 모두 삭제 본문
R 패키지에 문제가 생겼을 때 단순히 R을 지우고 재설치하곤 합니다.
그러나 이 방법으로는 해결되지 않는 경우가 많습니다.
이럴 때는 사용자가 설치한 모든 패키지를 삭제하는 방법도 써볼만합니다.
아래에 그 코드를 공유합니다.
# create a list of all installed packages
ip <- as.data.frame(installed.packages())
head(ip)
# if you use MRO, make sure that no packages in this library will be removed
ip <- subset(ip, !grepl("MRO", ip$LibPath))
# we don't want to remove base or recommended packages either\
ip <- ip[!(ip[,"Priority"] %in% c("base", "recommended")),]
# determine the library where the packages are installed
path.lib <- unique(ip$LibPath)
# create a vector with all the names of the packages you want to remove
pkgs.to.remove <- ip[,1]
head(pkgs.to.remove)
# remove the packages
sapply(pkgs.to.remove, remove.packages, lib = path.lib)
'코딩, 딱 지금이 시작할때! (코딱지)' 카테고리의 다른 글
[Python] 특정 문자열 목록을 포함하는 모든 파일 찾아서 복사하기 (0) | 2023.01.17 |
---|---|
[Python] 사진 및 영상 배경 쉽게 제거해주는 프로그램 (무료, 여러개 한번에) (0) | 2023.01.12 |
[R] 인덱싱(indexing) - 데이터에서 원하는 값 추출 (0) | 2023.01.12 |
[R] 데이터프레임 쓰기 및 읽기 - read.table(), write.table() (0) | 2023.01.07 |
[R] 데이터 전처리 - 결합 (cbind, rbind, merge) (1) | 2023.01.07 |