Hi @M_AcostaCH ! This is actually a setting in pandoc, not R Markdown. It's covered in more depth here.
" For PDF output, it is trickier to wrap the lines. One solution is to use the LaTeX package listings , which can be enabled via the Pandoc argument --listings"
...but it's a great excuse to use one of the many great .html outputs !
---
title: "Estadística Básica para Ciencia de Datos con R"
author: "Ciencia de Datos Ecuador"
date: "23/2/2022"
output:
pdf_document: default
pandoc_args: --listings
html_document: default
---