From 377e675ba825fea44d4448f0bfd5806086e156aa Mon Sep 17 00:00:00 2001 From: Anders Askeland Date: Wed, 7 Aug 2024 14:50:50 +0200 Subject: [PATCH] =?UTF-8?q?docs(sessions):=20=F0=9F=93=9D=20add=20learning?= =?UTF-8?q?=20objectives=20for=20documenting=20functions=20(#26)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Luke W. Johnston --- sessions/documenting-functions.qmd | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/sessions/documenting-functions.qmd b/sessions/documenting-functions.qmd index 555b5ab..f46bdb6 100644 --- a/sessions/documenting-functions.qmd +++ b/sessions/documenting-functions.qmd @@ -1,4 +1,4 @@ -# TODO: Lesson title here +# Documenting functions in your package {#sec-documenting-functions} {{< include ../includes/_wip.qmd >}} @@ -8,10 +8,25 @@ -**Session objectives**: +## Learning objectives -- Describe the purpose of documenting code and packages -- Document functions with `{roxygen2}` +The overall **learning outcome** for this session is: + +- Explain why high-quality, well-written function documentation is + important when creating a package intended to be used by others. + +Specific **objectives** are: + +- Describe the purpose of function-specific documentation and identify + core components to include in the documentation. +- Use `{roxygen2}` to setup a template documentation structure and + then write Markdown-based documentation within that template for + functions. +- Use the examples section of the documentation to help prototype and + informally check that the function works. Then later write more + example code that highlights how to use the function. +- Use `{devtools}` to automatically generate package documentation + that can be accessible when using `?function_name`. ## Documenting Functions