Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo of session info folded inside Details tag #55

Closed
jennybc opened this issue Jan 2, 2017 · 2 comments
Closed

Demo of session info folded inside Details tag #55

jennybc opened this issue Jan 2, 2017 · 2 comments

Comments

@jennybc
Copy link
Member

@jennybc jennybc commented Jan 2, 2017

Hello world

## a comment
(x <- 1:4)
#> [1] 1 2 3 4

hi again

y <- 2:5
x + y
#> [1] 3 5 7 9
Session info
devtools::session_info()
#> Session info -------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.3.1 (2016-06-21)
#>  system   x86_64, darwin13.4.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_CA.UTF-8                 
#>  tz       America/Vancouver           
#>  date     2017-01-02
#> Packages -----------------------------------------------------------------
#>  package   * version     date       source                            
#>  backports   1.0.4       2016-10-24 cran (@1.0.4)                     
#>  devtools    1.12.0.9000 2017-01-02 Github (hadley/devtools@1ce84b0)  
#>  digest      0.6.10      2016-08-02 cran (@0.6.10)                    
#>  evaluate    0.10        2016-10-11 cran (@0.10)                      
#>  htmltools   0.3.5       2016-03-21 CRAN (R 3.2.4)                    
#>  knitr       1.15.1      2016-11-22 CRAN (R 3.3.2)                    
#>  magrittr    1.5         2014-11-22 CRAN (R 3.2.0)                    
#>  memoise     1.0.0.9001  2016-12-18 Github (hadley/memoise@884d565)   
#>  pkgbuild    0.0.0.9000  2016-11-22 Github (r-pkgs/pkgbuild@65eace0)  
#>  pkgload     0.0.0.9000  2016-11-22 Github (r-pkgs/pkgload@def2b10)   
#>  Rcpp        0.12.8.3    2017-01-02 Github (RcppCore/Rcpp@f0442a0)    
#>  rmarkdown   1.3         2017-01-02 Github (rstudio/rmarkdown@3276760)
#>  rprojroot   1.1         2016-11-15 Github (krlmlr/rprojroot@1745481) 
#>  stringi     1.1.2       2016-10-01 CRAN (R 3.3.0)                    
#>  stringr     1.1.0       2016-08-19 CRAN (R 3.3.0)                    
#>  withr       1.0.2       2016-06-20 cran (@1.0.2)                     
#>  yaml        2.1.14      2016-11-12 cran (@2.1.14)
@jimhester
Copy link
Member

@jimhester jimhester commented Jan 3, 2017

Yay, it will be great to get more people doing this!

@jennybc
Copy link
Member Author

@jennybc jennybc commented Jan 3, 2017

@jimhester 🙂 Explanation not for you, but to document for others.

How did I achieve this? I executed the code below and pasted into this issue. What's important?

  • venue is GitHub (venue = "gh"), which is the default
  • si = TRUE

That appends session info AND folds it nicely into a Details tag.

input <- c(
  "#' Hello world",
  "## a comment",
  "(x <- 1:4)",
  "#' hi again",
  "y <- 2:5",
  "x + y"
)
output <- reprex(input = input, si = TRUE)

What's not important? This specific use of input. This should work with any method of providing reprex source (clipboard, expression, character, file path).

@hadley hadley closed this May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants