Skip to content

Code/output blocks are split #463

Closed
Closed
@florisvdh

Description

@florisvdh

Running the following in a bare R console:

reprex::reprex(
  {
    1:4
    2:5
  },
  session_info = TRUE
)

gives:

1:4
#> [1] 1 2 3 4
2:5
#> [1] 2 3 4 5

Created on 2024-05-29 with reprex v2.1.0.9000

Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.4.0 (2024-04-24)
#>  os       Linux Mint 21.3
#>  system   x86_64, linux-gnu
#>  ui       X11
#>  language nl_BE:nl
#>  collate  nl_BE.UTF-8
#>  ctype    nl_BE.UTF-8
#>  tz       Europe/Brussels
#>  date     2024-05-29
#>  pandoc   3.1.11 @ /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/x86_64/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version    date (UTC) lib source
#>  cli           3.6.2      2023-12-11 [3] RSPM (R 4.3.0)
#>  digest        0.6.35     2024-03-11 [3] RSPM (R 4.3.0)
#>  evaluate      0.23       2023-11-01 [3] RSPM (R 4.3.0)
#>  fastmap       1.2.0      2024-05-15 [3] RSPM (R 4.4.0)
#>  fs            1.6.4      2024-04-25 [3] RSPM (R 4.3.0)
#>  glue          1.7.0      2024-01-09 [3] RSPM (R 4.3.0)
#>  htmltools     0.5.8.1    2024-04-04 [3] RSPM (R 4.3.0)
#>  knitr         1.46       2024-04-06 [3] RSPM (R 4.3.0)
#>  lifecycle     1.0.4      2023-11-07 [3] RSPM (R 4.3.0)
#>  magrittr      2.0.3      2022-03-30 [3] RSPM (R 4.2.0)
#>  purrr         1.0.2      2023-08-10 [3] RSPM (R 4.2.0)
#>  R.cache       0.16.0     2022-07-21 [3] RSPM (R 4.2.0)
#>  R.methodsS3   1.8.2      2022-06-13 [3] RSPM (R 4.2.0)
#>  R.oo          1.26.0     2024-01-24 [3] RSPM (R 4.3.0)
#>  R.utils       2.12.3     2023-11-18 [3] RSPM (R 4.3.0)
#>  reprex        2.1.0.9000 2024-05-29 [1] Github (tidyverse/reprex@e1f65e9)
#>  rlang         1.1.3      2024-01-10 [3] RSPM (R 4.3.0)
#>  rmarkdown     2.27.1     2024-05-29 [1] Github (rstudio/rmarkdown@e1c93a9)
#>  rstudioapi    0.16.0     2024-03-24 [3] RSPM (R 4.3.0)
#>  sessioninfo   1.2.2      2021-12-06 [3] RSPM (R 4.2.0)
#>  styler        1.10.3     2024-04-07 [3] RSPM (R 4.3.0)
#>  vctrs         0.6.5      2023-12-01 [3] RSPM (R 4.3.0)
#>  withr         3.0.0      2024-01-16 [3] RSPM (R 4.3.2)
#>  xfun          0.44       2024-05-15 [3] RSPM (R 4.4.0)
#>  yaml          2.3.8      2023-12-11 [3] RSPM (R 4.3.0)
#> 
#>  [1] /home/floris/lib/R/library
#>  [2] /usr/local/lib/R/site-library
#>  [3] /usr/lib/R/site-library
#>  [4] /usr/lib/R/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────

Before, {reprex} would keep code and output together in one block. More recently though, R version and rmarkdown versions have changed.

Running knitr::opts_chunk$set(collapse = TRUE) didn't solve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions