Skip to content

:= operator does not suppress print in rmarkdown and quarto #7673

@ntthung

Description

@ntthung

I've been using this package for several years and never had this issue until now.

In rmarkdown, the := doesn't suppress print. This doesn't happen in the console, only in rmarkdown.

```{r}
library(data.table)
DT <- data.table(x = 1:2, y = 1:2)
DT[, z := 1:2]
# this prints although it shouldn't

May relate to this: rstudio/rmarkdown#829, but this is now with both the dev and stable versions of rmarkdown. I've tried updating both data.table and rmarkdown but the issue persists.

sessionInfo()

R version 4.5.3 (2026-03-11 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default
LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_United States.utf8
[2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] ggplot2_4.0.2 data.table_1.18.99

loaded via a namespace (and not attached):
[1] vctrs_0.7.1 cli_3.6.5 knitr_1.51
[4] rlang_1.1.7 xfun_0.56 otel_0.2.0
[7] generics_0.1.4 S7_0.2.1 glue_1.8.0
[10] htmltools_0.5.9 rmarkdown_2.30.3 scales_1.4.0
[13] grid_4.5.3 evaluate_1.0.5 tibble_3.3.1
[16] fastmap_1.2.0 yaml_2.3.12 lifecycle_1.0.5
[19] compiler_4.5.3 dplyr_1.2.0 RColorBrewer_1.1-3
[22] pkgconfig_2.0.3 rstudioapi_0.18.0 digest_0.6.39
[25] farver_2.1.2 R6_2.6.1 tidyselect_1.2.1
[28] pillar_1.11.1 magrittr_2.0.4 tools_4.5.3
[31] withr_3.0.2 gtable_0.3.6

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