View source: R/insert_protocolsection.R
insert_protocolsection | R Documentation |
The idea is to execute this function in an R chunk with knitr
option results="asis"
.
insert_protocolsection(
code_subprotocol,
version_number,
file_name,
section = NULL,
demote_header = c(0, 1, 2, -1),
fetch_remote = TRUE
)
code_subprotocol |
Character string giving the protocol code from
which a sub-protocol will be made (usually a |
version_number |
Character string with format |
file_name |
Character string with the name of the Rmarkdown file (a chapter starting with a level 1 heading). |
section |
Optional character string with the name of a section within an Rmarkdown file. Can also be a unique substring of a section title. If not specified (the default): the whole file is taken. It is assumed that the section has a level 2 heading. |
demote_header |
Number of '#' to prefix to all titles before inserting in current protocol. Default is 0. A negative value can be used to remove '#' from all section titles. Allowed values are visible in the usage section. |
fetch_remote |
Whether or not to fetch the remote. Default TRUE. |
The function will return Rmarkdown
Other creation:
add_dependencies()
,
add_one_subprotocol()
,
add_subprotocols()
,
create_protocol()
,
update_protocol()
,
update_version_number()
## Not run:
insert_protocolsection(
code_subprotocol = "sfp-401-nl",
version_number = "2021.01",
file_name = "07_stappenplan.Rmd"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.