Code working in RStudio but not quarto

@jimmy_squids if you still have issue, can you share more about your document and formatted correctly ? FAQ: How to Format R Markdown Source