Hi, you could have a look at the knitr::spin function. See https://deanattali.com/2015/03/24/knitrs-best-hidden-gem-spin/