Include custom code chunks from separate files

Hello, right now I'm helping with a tutorial package that uses learnr. We're currently trying to streamline the tutorial-making process and one of the problems is that we have custom code chunks that have to be included at the beginning of every tutorials.

Is there a way for these code chunks to be saved in a separate place and "imported" into each Rmd file without having to include the entire code chunks in every file?

Thank you in advance!

1 Like

Would including them as a child document as outlined in 16.4 Child documents (*) | R Markdown Cookbook work?

2 Likes

That worked perfectly! Thank you so much!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.