library(details)

One the most basic and popular uses for details is to paste the sessioninfo at the bottom of a GitHub issue.

Pro tip: When using details in knitr/rmarkdown documents there is no need to set the knitr chunk options to results=‘asis’, there are already predefined print methods for these environments.


sessioninfo::session_info()%>%
  details::details(
    summary = 'Current session info',
    open    = TRUE
  )

Current session info


─ Session info ───────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.6.3 (2020-02-29)
 os       macOS Catalina 10.15.7      
 system   x86_64, darwin15.6.0        
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       UTC                         
 date     2021-01-14                  

─ Packages ───────────────────────────────────────────────────────────────────
 package     * version    date       lib
 assertthat    0.2.1      2019-03-21 [1]
 cli           2.2.0      2020-11-20 [1]
 clipr         0.7.1      2020-10-08 [1]
 crayon        1.3.4      2017-09-16 [1]
 desc          1.2.0      2018-05-01 [1]
 details     * 0.2.2      2021-01-14 [1]
 digest        0.6.27     2020-10-24 [1]
 evaluate      0.14       2019-05-28 [1]
 fansi         0.4.1      2020-01-08 [1]
 fs            1.5.0      2020-07-31 [1]
 glue          1.4.2      2020-08-27 [1]
 htmltools     0.5.1      2021-01-12 [1]
 httr          1.4.2      2020-07-20 [1]
 knitr         1.30       2020-09-22 [1]
 magrittr      2.0.1      2020-11-17 [1]
 MASS          7.3-51.5   2019-12-20 [2]
 memoise       1.1.0      2017-04-21 [1]
 pkgdown       1.4.1.9000 2021-01-14 [1]
 png           0.1-7      2013-12-03 [1]
 R6            2.5.0      2020-10-28 [1]
 rlang         0.4.10     2020-12-30 [1]
 rmarkdown     2.6        2020-12-14 [1]
 rprojroot     2.0.2      2020-11-15 [1]
 sessioninfo   1.1.1      2018-11-05 [1]
 stringi       1.5.3      2020-09-09 [1]
 stringr       1.4.0      2019-02-10 [1]
 withr         2.3.0      2020-09-22 [1]
 xfun          0.20       2021-01-06 [1]
 xml2          1.3.2      2020-04-23 [1]
 yaml          2.2.1      2020-02-01 [1]
 source                                      
 CRAN (R 3.6.0)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.0)                              
 CRAN (R 3.6.0)                              
 local                                       
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.0)                              
 CRAN (R 3.6.0)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.3)                              
 CRAN (R 3.6.0)                              
 Github (metrumresearchgroup/pkgdown@08d56fc)
 CRAN (R 3.6.0)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.0)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.0)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.2)                              
 CRAN (R 3.6.0)                              

[1] /Users/runner/work/_temp/Library
[2] /Library/Frameworks/R.framework/Versions/3.6/Resources/library