Skip to contents

Takes a package name and returns a character vector of all the paths to tutorials in the installed package. Assumes that every Rmd file in inst/tutorials/*/ is a tutorial, which should be true.

Usage

return_tutorial_paths(package)

Arguments

package

Character vector of the package name to be tested.

Value

Character vector of the full paths to all installed tutorials in package.

Examples

return_tutorial_paths('learnr')
#>  [1] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/ex-data-basics/ex-data-basics.Rmd"            
#>  [2] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/ex-data-filter/ex-data-filter.Rmd"            
#>  [3] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/ex-data-mutate/ex-data-mutate.Rmd"            
#>  [4] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/ex-data-summarise/ex-data-manip-summarise.Rmd"
#>  [5] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/ex-setup-r/ex-setup-r.Rmd"                    
#>  [6] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/hello/hello.Rmd"                              
#>  [7] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/polyglot/polyglot.Rmd"                        
#>  [8] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/quiz_question/quiz_question.Rmd"              
#>  [9] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/setup-chunks/setup-chunks.Rmd"                
#> [10] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/slidy/slidy.Rmd"                              
#> [11] "/home/runner/.cache/R/renv/library/tutorial.helpers-cdd4ef10/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/learnr/tutorials/sql-exercise/sql-exercise.Rmd"