format_tutorial {tutorial.helpers}R Documentation

Format RMarkdown tutorial code chunks

Description

This function processes an R Markdown tutorial file to standardize code chunk labels based on section names and exercise numbers. It also renumbers exercises sequentially within each section.

Usage

format_tutorial(file_path)

Arguments

file_path

Character string. Path to the R Markdown file to process.

Details

The function applies the following formatting rules:

Value

Character string containing the formatted R Markdown content.

Examples

## Not run: 
# Format a tutorial file
new_content <- format_tutorial("path/to/tutorial.Rmd")

# Write the formatted content to a file
writeLines(new_content, "path/to/formatted_tutorial.Rmd")

## End(Not run)


[Package tutorial.helpers version 0.5.0 Index]