答案 0 :(得分:2)
来自?devtools::session_info()
*:包装是否附在搜索路径上
您可以使用search()
查找搜索路径。例如对我来说显示为
search()
# [1] ".GlobalEnv" "package:janitor" "package:xts" "package:zoo"
# [5] "package:nycflights13" "package:lubridate" "package:ggrepel" "package:data.table"
# [9] "package:matrixStats" "package:forcats" "package:stringr" "package:purrr"
#[13] "package:readr" "package:tidyr" "package:tibble" "package:ggplot2"
#[17] "package:tidyverse" "package:dplyr" "tools:rstudio" "package:stats"
#[21] "package:graphics" "package:grDevices" "package:utils" "package:datasets"
#[25] "package:methods" "Autoloads" "package:base"
要查找功能,请仔细查看该列表。最好阅读This,以了解搜索路径。
答案 1 :(得分:0)
文档制定时,似乎标记了sessionInfo
中所述的“其他附加软件包”或“ *:软件包是否附加到搜索路径”。例如,session_info
在调用library(tidyverse)
之前返回以下内容:
package * version date lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
backports 1.1.4 2019-04-10 [1] CRAN (R 3.6.0)
callr 3.2.0 2019-03-15 [1] CRAN (R 3.6.0)
cli 1.1.0 2019-03-19 [1] CRAN (R 3.6.0)
crayon 1.3.4 2017-09-16 [1] CRAN (R 3.6.0)
desc 1.2.0 2018-05-01 [1] CRAN (R 3.6.0)
devtools 2.0.2 2019-04-08 [1] CRAN (R 3.6.0)
digest 0.6.18 2018-10-10 [1] CRAN (R 3.6.0)
fs 1.3.0 2019-05-02 [1] CRAN (R 3.6.0)
glue 1.3.1 2019-03-12 [1] CRAN (R 3.6.0)
magrittr 1.5 2014-11-22 [1] CRAN (R 3.6.0)
memoise 1.1.0 2017-04-21 [1] CRAN (R 3.6.0)
pkgbuild 1.0.3 2019-03-20 [1] CRAN (R 3.6.0)
pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.6.0)
prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.6.0)
processx 3.3.0 2019-03-10 [1] CRAN (R 3.6.0)
ps 1.3.0 2018-12-21 [1] CRAN (R 3.6.0)
R6 2.4.0 2019-02-14 [1] CRAN (R 3.6.0)
Rcpp 1.0.1 2019-03-17 [1] CRAN (R 3.6.0)
remotes 2.0.4 2019-04-10 [1] CRAN (R 3.6.0)
rlang 0.3.4 2019-04-07 [1] CRAN (R 3.6.0)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.6.0)
rstudioapi 0.10 2019-03-19 [1] CRAN (R 3.6.0)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.0)
usethis 1.5.0 2019-04-07 [1] CRAN (R 3.6.0)
withr 2.1.2 2018-03-15 [1] CRAN (R 3.6.0)
调用library(tidyverse)
后返回以下内容:
package * version date lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
backports 1.1.4 2019-04-10 [1] CRAN (R 3.6.0)
broom 0.5.2 2019-04-07 [1] CRAN (R 3.6.0)
callr 3.2.0 2019-03-15 [1] CRAN (R 3.6.0)
cellranger 1.1.0 2016-07-27 [1] CRAN (R 3.6.0)
cli 1.1.0 2019-03-19 [1] CRAN (R 3.6.0)
colorspace 1.4-1 2019-03-18 [1] CRAN (R 3.6.0)
crayon 1.3.4 2017-09-16 [1] CRAN (R 3.6.0)
desc 1.2.0 2018-05-01 [1] CRAN (R 3.6.0)
devtools 2.0.2 2019-04-08 [1] CRAN (R 3.6.0)
digest 0.6.18 2018-10-10 [1] CRAN (R 3.6.0)
dplyr * 0.8.0.1 2019-02-15 [1] CRAN (R 3.6.0)
forcats * 0.4.0 2019-02-17 [1] CRAN (R 3.6.0)
fs 1.3.0 2019-05-02 [1] CRAN (R 3.6.0)
generics 0.0.2 2018-11-29 [1] CRAN (R 3.6.0)
ggplot2 * 3.1.1 2019-04-07 [1] CRAN (R 3.6.0)
glue 1.3.1 2019-03-12 [1] CRAN (R 3.6.0)
gtable 0.3.0 2019-03-25 [1] CRAN (R 3.6.0)
haven 2.1.0 2019-02-19 [1] CRAN (R 3.6.0)
hms 0.4.2 2018-03-10 [1] CRAN (R 3.6.0)
httr 1.4.0 2018-12-11 [1] CRAN (R 3.6.0)
jsonlite 1.6 2018-12-07 [1] CRAN (R 3.6.0)
lattice 0.20-38 2018-11-04 [1] CRAN (R 3.6.0)
lazyeval 0.2.2 2019-03-15 [1] CRAN (R 3.6.0)
lubridate 1.7.4 2018-04-11 [1] CRAN (R 3.6.0)
magrittr 1.5 2014-11-22 [1] CRAN (R 3.6.0)
memoise 1.1.0 2017-04-21 [1] CRAN (R 3.6.0)
modelr 0.1.4 2019-02-18 [1] CRAN (R 3.6.0)
munsell 0.5.0 2018-06-12 [1] CRAN (R 3.6.0)
nlme 3.1-139 2019-04-09 [1] CRAN (R 3.6.0)
pillar 1.3.1 2018-12-15 [1] CRAN (R 3.6.0)
pkgbuild 1.0.3 2019-03-20 [1] CRAN (R 3.6.0)
pkgconfig 2.0.2 2018-08-16 [1] CRAN (R 3.6.0)
pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.6.0)
plyr 1.8.4 2016-06-08 [1] CRAN (R 3.6.0)
prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.6.0)
processx 3.3.0 2019-03-10 [1] CRAN (R 3.6.0)
ps 1.3.0 2018-12-21 [1] CRAN (R 3.6.0)
purrr * 0.3.2 2019-03-15 [1] CRAN (R 3.6.0)
R6 2.4.0 2019-02-14 [1] CRAN (R 3.6.0)
Rcpp 1.0.1 2019-03-17 [1] CRAN (R 3.6.0)
readr * 1.3.1 2018-12-21 [1] CRAN (R 3.6.0)
readxl 1.3.1 2019-03-13 [1] CRAN (R 3.6.0)
remotes 2.0.4 2019-04-10 [1] CRAN (R 3.6.0)
rlang 0.3.4 2019-04-07 [1] CRAN (R 3.6.0)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.6.0)
rstudioapi 0.10 2019-03-19 [1] CRAN (R 3.6.0)
rvest 0.3.3 2019-04-11 [1] CRAN (R 3.6.0)
scales 1.0.0 2018-08-09 [1] CRAN (R 3.6.0)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.0)
stringi 1.4.3 2019-03-12 [1] CRAN (R 3.6.0)
stringr * 1.4.0 2019-02-10 [1] CRAN (R 3.6.0)
tibble * 2.1.1 2019-03-16 [1] CRAN (R 3.6.0)
tidyr * 0.8.3 2019-03-01 [1] CRAN (R 3.6.0)
tidyselect 0.2.5 2018-10-11 [1] CRAN (R 3.6.0)
tidyverse * 1.2.1 2017-11-14 [1] CRAN (R 3.6.0)
usethis 1.5.0 2019-04-07 [1] CRAN (R 3.6.0)
withr 2.1.2 2018-03-15 [1] CRAN (R 3.6.0)
xml2 1.2.0 2018-01-24 [1] CRAN (R 3.6.0)
如果将session_info
对象转换为常规数据帧,则会看到星号对应于逻辑向量attached
:
si <- devtools::session_info()
as.data.frame(si$packages) %>% select(package, attached)
#### OUTPUT ####
package attached
assertthat assertthat FALSE
backports backports FALSE
broom broom FALSE
callr callr FALSE
cellranger cellranger FALSE
cli cli FALSE
colorspace colorspace FALSE
crayon crayon FALSE
desc desc FALSE
devtools devtools FALSE
digest digest FALSE
dplyr dplyr TRUE
fansi fansi FALSE
forcats forcats TRUE
fs fs FALSE
generics generics FALSE
ggplot2 ggplot2 TRUE
glue glue FALSE
gtable gtable FALSE
haven haven FALSE
hms hms FALSE
httr httr FALSE
jsonlite jsonlite FALSE
lattice lattice FALSE
lazyeval lazyeval FALSE
lubridate lubridate FALSE
magrittr magrittr FALSE
memoise memoise FALSE
modelr modelr FALSE
munsell munsell FALSE
nlme nlme FALSE
pillar pillar FALSE
pkgbuild pkgbuild FALSE
pkgconfig pkgconfig FALSE
pkgload pkgload FALSE
plyr plyr FALSE
prettyunits prettyunits FALSE
processx processx FALSE
ps ps FALSE
purrr purrr TRUE
R6 R6 FALSE
Rcpp Rcpp FALSE
readr readr TRUE
readxl readxl FALSE
remotes remotes FALSE
rlang rlang FALSE
rprojroot rprojroot FALSE
rstudioapi rstudioapi FALSE
rvest rvest FALSE
scales scales FALSE
sessioninfo sessioninfo FALSE
stringi stringi FALSE
stringr stringr TRUE
tibble tibble TRUE
tidyr tidyr TRUE
tidyselect tidyselect FALSE
tidyverse tidyverse TRUE
usethis usethis FALSE
utf8 utf8 FALSE
withr withr FALSE
xml2 xml2 FALSE