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

Request to change the dash symbol in the output #14

Closed
lcolladotor opened this issue Sep 21, 2018 · 6 comments
Closed

Request to change the dash symbol in the output #14

lcolladotor opened this issue Sep 21, 2018 · 6 comments

Comments

@lcolladotor
Copy link

Hi,

I got an automatic email from @jimhester today about the change from devtools::sesion_info() to sessioninfo::session_info(). That's ok with me except for this one issue: sessioninfo uses a dash symbol different from the simple - we all use (and that is used by devtools).

> sessioninfo::session_info()
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 3.5.1 (2018-07-02)
 os       macOS High Sierra 10.13.6
 system   x86_64, darwin15.6.0
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 tz       America/New_York
 date     2018-09-21Packages ───────────────────────────────────────────────────────────────────
 package     * version date       source
 clisymbols    1.2.0   2017-05-21 CRAN (R 3.5.0)
 colorout    * 1.2-0   2018-05-03 Github (jalvesaq/colorout@c42088d)
 sessioninfo   1.0.0   2017-06-21 CRAN (R 3.5.0)
 withr         2.1.2   2018-03-15 CRAN (R 3.5.0) 
Session info ------------------------------------------------------------------
 setting  value
 version  R version 3.5.1 (2018-07-02)
 system   x86_64, darwin15.6.0
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 tz       America/New_York
 date     2018-09-21

Packages ----------------------------------------------------------------------
 package   * version date       source
 base      * 3.5.1   2018-07-09 local
 colorout  * 1.2-0   2018-05-03 Github (jalvesaq/colorout@c42088d)
 compiler    3.5.1   2018-07-09 local
 datasets  * 3.5.1   2018-07-09 local
 devtools    1.13.6  2018-06-27 CRAN (R 3.5.0)
 digest      0.6.17  2018-09-12 CRAN (R 3.5.1)
 graphics  * 3.5.1   2018-07-09 local
 grDevices * 3.5.1   2018-07-09 local
 memoise     1.1.0   2017-04-21 CRAN (R 3.5.0)
 methods   * 3.5.1   2018-07-09 local
 stats     * 3.5.1   2018-07-09 local
 utils     * 3.5.1   2018-07-09 local
 withr       2.1.2   2018-03-15 CRAN (R 3.5.0)

Why does this matter? Well, this issue then breaks rmarkdown::render('test.Rmd', output = 'pdf_document') as shown below.

test.Rmd file contents:

    ---
    title: "Test"
    author: "L. Collado-Torres"
    date: "9/21/2018"
    output: pdf_document
    ---

    ```{r}
    options(width = 120)
    sessioninfo::session_info()
    ```

Output from using rmarkdown::render() (well, the knit button in RStudio):

Loading required package: colorout
  |......................                                           |  33%
  ordinary text without R code

  |...........................................                      |  67%


processing file: test.Rmd
label: unnamed-chunk-1
  |.................................................................| 100%
  ordinary text without R code


/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.tex --template /Library/Frameworks/R.framework/Versions/3.5devel/Resources/library/rmarkdown/rmd/latex/default-1.17.0.2.tex --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable 'geometry:margin=1in' --variable 'compact-title:yes' 
output file: test.knit.md

! Package inputenc Error: Unicode char ─ (U+2500)
(inputenc)                not set up for use with LaTeX.

Error: Failed to compile test.tex. See test.log for more info.
Execution halted

Let me know if you need any other information.

On a similar note, I'm not sure of the ! symbols that get added sometimes will break things too. In this particular R session I was testing different things for a few days and updated some R packages in a separate R session before getting the output. If that's the only way you get ! in the output, I'm guessing that it would be ok with LaTeX. But since it's not a unicode problem, I'm hoping/guessing that using results = 'asis' on the code chunk would work.

> sessioninfo::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 os       macOS High Sierra 10.13.6   
 system   x86_64, darwin15.6.0        
 ui       AQUA                        
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            
 date     2018-09-21Packages ──────────────────────────────────────────────────────────────────────────────────
 package              * version     date       source                                   
 acepack                1.4.1       2016-10-29 CRAN (R 3.5.0)                           
 AnnotationDbi          1.43.1      2018-05-08 Bioconductor                             
 assertthat             0.2.0       2017-04-11 cran (@0.2.0)                            
 backports              1.1.2       2017-12-13 cran (@1.1.2)                            
 base64enc              0.1-3       2015-07-28 cran (@0.1-3)                            
 bibtex                 0.4.2       2017-06-30 CRAN (R 3.5.0)                           
 bindr                  0.1.1       2018-03-13 cran (@0.1.1)                            
 bindrcpp               0.2.2       2018-03-29 cran (@0.2.2)                            
 Biobase              * 2.41.2      2018-07-18 Bioconductor                             
 BiocGenerics         * 0.27.1      2018-06-17 Bioconductor                             
 BiocParallel         * 1.15.9 (!)  2018-09-13 Bioconductor                             
 biomaRt                2.37.5 (!)  2018-09-06 Bioconductor                             
 Biostrings             2.49.1      2018-08-04 Bioconductor                             
 bit                    1.1-14      2018-05-29 CRAN (R 3.5.0)                           
 bit64                  0.9-7       2017-05-08 CRAN (R 3.5.0)                           
 bitops                 1.0-6       2013-08-17 cran (@1.0-6)                            
 blob                   1.1.1       2018-03-25 CRAN (R 3.5.0)                           
 BSgenome               1.49.3      2018-07-27 Bioconductor                             
 bumphunter             1.23.0      2018-05-01 Bioconductor                             
 checkmate              1.8.5       2017-10-24 CRAN (R 3.5.0)                           
 clisymbols             1.2.0       2017-05-21 CRAN (R 3.5.0)                           
 cluster                2.0.7-1     2018-04-13 CRAN (R 3.5.1)                           
 codetools              0.2-15      2016-10-05 CRAN (R 3.5.1)                           
 colorspace             1.3-2       2016-12-14 cran (@1.3-2)                            
 crayon                 1.3.4       2017-09-16 cran (@1.3.4)                            
 curl                   3.2         2018-03-28 CRAN (R 3.5.0)                           
 data.table           * 1.11.4 (!)  2018-09-19 CRAN (R 3.5.1)                           
 DBI                    1.0.0       2018-05-02 CRAN (R 3.5.0)                           
 DelayedArray         * 0.7.34 (!)  2018-09-14 Bioconductor                             
 derfinder              1.15.2      2018-07-24 Bioconductor                             
 derfinderHelper        1.15.1      2018-07-24 Bioconductor                             
 devtools             * 1.13.6      2018-06-27 CRAN (R 3.5.0)                           
 digest                 0.6.16 (!)  2018-09-12 CRAN (R 3.5.1)                           
 doRNG                  1.7.1       2018-06-22 CRAN (R 3.5.0)                           
 downloader             0.4         2015-07-09 CRAN (R 3.5.0)                           
 dplyr                  0.7.6       2018-06-29 CRAN (R 3.5.1)                           
 evaluate               0.11        2018-07-17 CRAN (R 3.5.0)                           
 foreach                1.4.4       2017-12-12 CRAN (R 3.5.0)                           
 foreign                0.8-71      2018-07-20 CRAN (R 3.5.0)                           
 Formula                1.2-3       2018-05-03 CRAN (R 3.5.0)                           
 GenomeInfoDb         * 1.17.1      2018-05-11 Bioconductor                             
 GenomeInfoDbData       1.1.0       2018-05-04 Bioconductor                             
 GenomicAlignments      1.17.3      2018-07-18 Bioconductor                             
 GenomicFeatures        1.33.2      2018-08-13 Bioconductor                             
 GenomicFiles           1.17.2      2018-07-18 Bioconductor                             
 GenomicRanges        * 1.33.13 (!) 2018-09-20 Bioconductor                             
 GEOquery               2.49.0 (!)  2018-08-30 Bioconductor                             
 ggplot2                3.0.0       2018-07-03 CRAN (R 3.5.0)                           
 git2r                  0.23.0      2018-07-17 CRAN (R 3.5.0)                           
 glue                   1.3.0       2018-07-17 CRAN (R 3.5.0)                           
 gridExtra              2.3         2017-09-09 CRAN (R 3.5.0)                           
 gtable                 0.2.0       2016-02-26 CRAN (R 3.5.0)                           
 Hmisc                  4.1-1       2018-01-03 CRAN (R 3.5.0)                           
 hms                    0.4.2       2018-03-10 CRAN (R 3.5.0)                           
 htmlTable              1.12        2018-05-26 CRAN (R 3.5.0)                           
 htmltools              0.3.6       2017-04-28 cran (@0.3.6)                            
 htmlwidgets            1.2         2018-04-19 CRAN (R 3.5.0)                           
 httr                   1.3.1       2017-08-20 CRAN (R 3.5.0)                           
 IRanges              * 2.15.17 (!) 2018-09-20 Bioconductor                             
 iterators              1.0.10      2018-07-13 CRAN (R 3.5.0)                           
 jsonlite               1.5         2017-06-01 CRAN (R 3.5.0)                           
 knitr                  1.20        2018-02-20 cran (@1.20)                             
 knitrBootstrap       * 1.0.2       2018-09-21 Github (jimhester/knitrBootstrap@e298462)
 lattice                0.20-35     2017-03-25 CRAN (R 3.5.1)                           
 latticeExtra           0.6-28      2016-02-09 CRAN (R 3.5.0)                           
 lazyeval               0.2.1       2017-10-29 CRAN (R 3.5.0)                           
 limma                * 3.37.4 (!)  2018-09-20 Bioconductor                             
 locfit                 1.5-9.1     2013-04-20 CRAN (R 3.5.0)                           
 magrittr               1.5         2014-11-22 cran (@1.5)                              
 markdown               0.8         2017-04-20 cran (@0.8)                              
 Matrix                 1.2-14      2018-04-13 CRAN (R 3.5.1)                           
 matrixStats          * 0.54.0      2018-07-23 CRAN (R 3.5.1)                           
 memoise                1.1.0       2017-04-21 CRAN (R 3.5.0)                           
 munsell                0.5.0       2018-06-12 CRAN (R 3.5.0)                           
 nnet                   7.3-12      2016-02-02 CRAN (R 3.5.1)                           
 pillar                 1.3.0       2018-07-14 CRAN (R 3.5.0)                           
 pkgconfig              2.0.2       2018-08-16 CRAN (R 3.5.0)                           
 pkgmaker               0.27        2018-05-25 CRAN (R 3.5.0)                           
 plyr                   1.8.4       2016-06-08 cran (@1.8.4)                            
 prettyunits            1.0.2       2015-07-13 CRAN (R 3.5.0)                           
 progress               1.2.0       2018-06-14 CRAN (R 3.5.0)                           
 purrr                  0.2.5       2018-05-29 CRAN (R 3.5.0)                           
 qvalue                 2.13.0      2018-05-01 Bioconductor                             
 R6                     2.2.2       2017-06-17 CRAN (R 3.5.0)                           
 RColorBrewer           1.1-2       2014-12-07 cran (@1.1-2)                            
 Rcpp                   0.12.18     2018-07-23 CRAN (R 3.5.1)                           
 RCurl                  1.95-4.11   2018-07-15 CRAN (R 3.5.0)                           
 readr                  1.1.1       2017-05-16 CRAN (R 3.5.0)                           
 recount              * 1.7.5       2018-07-28 Bioconductor                             
 registry               0.5         2017-12-03 CRAN (R 3.5.0)                           
 rentrez                1.2.1       2018-03-05 CRAN (R 3.5.0)                           
 reshape2               1.4.3       2017-12-11 cran (@1.4.3)                            
 rlang                  0.2.2       2018-08-16 CRAN (R 3.5.0)                           
 rmarkdown              1.10        2018-06-11 CRAN (R 3.5.0)                           
 rngtools               1.3.1       2018-05-15 CRAN (R 3.5.0)                           
 rpart                  4.1-13      2018-02-23 CRAN (R 3.5.1)                           
 rprojroot              1.3-2       2018-01-03 cran (@1.3-2)                            
 Rsamtools              1.33.4 (!)  2018-09-04 Bioconductor                             
 RSQLite                2.1.1       2018-05-06 CRAN (R 3.5.0)                           
 rstudioapi             0.7         2017-09-07 CRAN (R 3.5.0)                           
 rtracklayer            1.41.4 (!)  2018-08-31 Bioconductor                             
 S4Vectors            * 0.19.19     2018-07-18 Bioconductor                             
 scales                 1.0.0       2018-08-09 CRAN (R 3.5.0)                           
 sessioninfo          * 1.0.0       2017-06-21 CRAN (R 3.5.0)                           
 stringi                1.2.4       2018-07-20 CRAN (R 3.5.0)                           
 stringr                1.3.1       2018-05-10 CRAN (R 3.5.0)                           
 SummarizedExperiment * 1.11.6      2018-07-17 Bioconductor                             
 survival               2.42-6      2018-07-13 CRAN (R 3.5.0)                           
 tibble                 1.4.2       2018-01-22 cran (@1.4.2)                            
 tidyr                  0.8.1       2018-05-18 CRAN (R 3.5.0)                           
 tidyselect             0.2.4       2018-02-26 cran (@0.2.4)                            
 VariantAnnotation      1.27.4      2018-08-21 Bioconductor                             
 withr                  2.1.2       2018-03-15 CRAN (R 3.5.0)                           
 XML                    3.98-1.16   2018-08-19 CRAN (R 3.5.0)                           
 xml2                   1.2.0       2018-01-24 CRAN (R 3.5.0)                           
 xtable                 1.8-2 (!)   2018-08-29 CRAN (R 3.5.0)                           
 XVector                0.21.3      2018-06-23 Bioconductor                             
 zlibbioc               1.27.0      2018-05-01 Bioconductor                     

Best,
Leo

@gaborcsardi
Copy link
Member

Actually, we use the clisymbols package, so maybe switching to cli will solve this, and the active bindings are OK.

@gaborcsardi
Copy link
Member

Yes, changing to cli solves this, it seems, as it does detect latex output. Fix coming soon.

@lcolladotor
Copy link
Author

Awesome, thanks for the quick fix @gaborcsardi! ^^

@lcolladotor
Copy link
Author

Actually, could you bump the version number so we can use that info on a DESCRIPTION file to make sure that the user has the right version of sessioninfo installed? Thanks!

lcolladotor added a commit to lcolladotor/derfinder that referenced this issue Sep 24, 2018
…on_info() as requested by Jim Hester now that r-lib/sessioninfo#14 has been resolved
lcolladotor added a commit to leekgroup/derfinderHelper that referenced this issue Sep 24, 2018
…on_info() as requested by Jim Hester now that r-lib/sessioninfo#14 has been resolved
lcolladotor added a commit to leekgroup/derfinderPlot that referenced this issue Sep 24, 2018
…on_info() as requested by Jim Hester now that r-lib/sessioninfo#14 has been resolved
lcolladotor added a commit to leekgroup/regionReport that referenced this issue Sep 24, 2018
…on_info() as requested by Jim Hester now that r-lib/sessioninfo#14 has been resolved
lcolladotor added a commit to leekgroup/recount that referenced this issue Sep 24, 2018
…n_info() as requested by Jim Hester now that r-lib/sessioninfo#14 has been resolved
lcolladotor added a commit to LieberInstitute/recount.bwtool that referenced this issue Sep 24, 2018
…ion_info() as requested by Jim Hester now that r-lib/sessioninfo#14 has been resolved
@gaborcsardi
Copy link
Member

Done, 1.0.1.9001. There are a bunch of new things, so let me know if it does not work as it should.

@lcolladotor
Copy link
Author

Great, thanks! ^^

And yes, I'll report any new issues (if I notice any).

Best,
Leo

lcolladotor added a commit to leekgroup/derfinderData that referenced this issue Sep 26, 2018
…ion_info() as requested by Jim Hester now that r-lib/sessioninfo#14 has been resolved + re-make the repo using by using the Bioc version (deleted the old GitHub history)
lcolladotor added a commit to LieberInstitute/recountWorkflow that referenced this issue Nov 16, 2018
…n_info() as requested by Jim Hester now that r-lib/sessioninfo#14 has been resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants