-
Notifications
You must be signed in to change notification settings - Fork 368
Open
Labels
enhancementNew feature or requestNew feature or requestknitrtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.Issues that were not self-assigned, signals that an issue was assigned to someone.
Milestone
Description
Bug description
The standard behaviour for R function is to print the warning after everything in the function is computed:
hello_then_warn <- function(){
warning("Warning")
print("Hello world")
}
hello_then_warn()

If I put this function in a Qmd and render it, the warning is before the "Hello world"

If I use the option chunk_output_type: console
in the notebook, the order is correct

If I use the option chunk_output_type: inline
, the order is different

Steps to reproduce
Create a qmd with the following function in an R chunk
hello_then_warn <- function(){
warning("Warning")
print("Hello world")
}
hello_then_warn()
Actual behavior
The warning message is before the print
Expected behavior
The warning message is after the print
Your environment
- RSTUDIO server 2025.05.1 Build 513
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestknitrtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.Issues that were not self-assigned, signals that an issue was assigned to someone.