You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this section, participants learn how to create functions that can be incorporated into R package.
Learning outcome
Overarching goal
Learn why and how one document R functions utilizing {roxygen2}.
Sub goals
Understand why function documentation is crucial for a package (exercise 1).
Learn to document functions using {roxygen2} (exercise 2).
Learn how to write and create examples within documentation (exercise 3).
Familiarize with and apply various Roxygen tags (exercise 4).
Exercises
During exercise, improve previously written functions with what is learned.
Exercise 1 - The Importance of Documentation
Discuss why detailed documentation is vital. Focus on its impact on code readability, maintenance, and collaboration.
Exercise 2 - Documenting Functions with {roxygen2}
Introduce the basics of using Roxygen for function documentation, covering essential aspects like the function's purpose, parameters (@param), return values (@return), and how to make a function available to users (@export).
Explain export and when to use it.
Exercise 3 - Writing Effective Examples
Learn about creating examples
I am unsure: Is this not also used in/as unit testing?
Exercise 4 - Additional Roxygen Tags to Know
Learn about additional Rozygen tags (reading exercise?)
@seealso: For linking related documentation or resources.
@family: To group related functions within the documentation.
@references: For adding citations to external sources or literature.
@note: To provide additional context or information.
@warnings: To alert users about any potential caveats or issues.
@inheritParams
Next...
??? Is it debugging?
The text was updated successfully, but these errors were encountered:
AndersAskeland
changed the title
Function development - Section 2: First steps
Function development - Paragraph 2: First steps
Mar 17, 2024
Previous section
The preceding section is:
sessions/function-development.qmd
.In this section, participants learn how to create functions that can be incorporated into R package.
Learning outcome
Overarching goal
{roxygen2}
.Sub goals
{roxygen2}
(exercise 2).Exercises
During exercise, improve previously written functions with what is learned.
Exercise 1 - The Importance of Documentation
Discuss why detailed documentation is vital. Focus on its impact on code readability, maintenance, and collaboration.
Exercise 2 - Documenting Functions with
{roxygen2}
@param
), return values (@return
), and how to make a function available to users (@export
).Exercise 3 - Writing Effective Examples
Exercise 4 - Additional Roxygen Tags to Know
@seealso
: For linking related documentation or resources.@family
: To group related functions within the documentation.@references
: For adding citations to external sources or literature.@note
: To provide additional context or information.@warnings
: To alert users about any potential caveats or issues.@inheritParams
Next...
??? Is it debugging?
The text was updated successfully, but these errors were encountered: