Create Your Own Functions in R (Part I): roxygen2, testthat, Returns, and Throwing Errors
Автор: Grace Tompkins, PhD
Загружено: 2025-10-17
Просмотров: 84
We will go through an example of a self-made function in R, and show how to document it with Roxygen2 ("roxy-gen") tags! Then, we'll go through how to test the function using the testthat package.
I also recently learned that I've been pronouncing this wrong for years LOL. Apologies for saying R-Oxygen2 multiple times!
Written Lecture: https://ubc-stat.github.io/STAT545.gi...
0:00 - Intro
1:37 - How to write a function
2:10 - Dice rolling example
4:07 - Documenting your function
4:40 - Documenting with Roxygen2 tags
6:41 - Testing your function with testthat
9:54 - How to throw an error
12:24 - Return statements
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: