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