reinstallr: Search and Install Missing Packages
- CRAN: http://cran.r-project.org/web/packages/reinstallr/index.html
- GitHub: https://github.com/calligross/reinstallr/
> library(reinstallr)
バージョン: 0.1.4
関数名 | 概略 |
---|---|
find_used_packages |
Find Files Where Specific Packages Are Used |
reinstallr |
reinstallr |
show_missing_packages |
Show used but not installed packages |
show_package_stats |
Show Used Packages |
find_used_packages
指定したパッケージが利用されているドキュメントを検出する
Arguments
- packages
- path
- pattern
> find_used_packages("dplyr", "~/Dropbox/R") %>% head()
file package
8 /Users/uri/Dropbox/R/API暮らし.Rmd dplyr
9 /Users/uri/Dropbox/R/API暮らし.Rmd dplyr
14 /Users/uri/Dropbox/R/auth/server.R dplyr
26 /Users/uri/Dropbox/R/exercise_geodata.Rmd dplyr
27 /Users/uri/Dropbox/R/exercise_geodata.Rmd dplyr
28 /Users/uri/Dropbox/R/exercise_geodata.Rmd dplyr
reinstallr
> reinstallr(path = "~/Documents/R/")
show_missing_packages
> show_missing_packages("~/Dropbox/R/")
package on_cran
1 esa FALSE
2 nightley FALSE
3 table FALSE
4 rphylopic FALSE
5 help FALSE
6 ggstat FALSE
show_package_stats
ディレクトリ内で利用されているライブラリを検知する
> show_package_stats("~/Dropbox/R/") %>%
+ dplyr::arrange(dplyr::desc(n)) %>% head()
package n
1 dplyr 23
2 ggplot2 14
3 knitr 12
4 httr 7
5 magrittr 5
6 rstan 5