name_chunks | R Documentation |
Name unnamed chunks in a single file using the filename with extension stripped as basis.
name_chunks(path, unname = FALSE)
path |
Path to file |
unname |
Should all chunks be unnamed before naming? Default is 'FALSE'. Turning this option on will cause all existing labels to be overwritten. In contrast, with its default 'unname = FALSE' only unlabelled chunks will be named. |
When using namer, please check the edits before pushing them to your code base. Such automatic chunk labelling is best paired with version control.
Always returns TRUE invisibly. Called for side effects.
temp_file_path <- file.path(tempdir(), "test.Rmd")
file.copy(system.file("examples", "example1.Rmd", package = "namer"),
temp_file_path,
overwrite = TRUE)
name_chunks(temp_file_path)
if(interactive()){
file.edit(temp_file_path)
}
file.remove(temp_file_path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.