Adds dependencies to the YAML of an index.Rmd
file
Usage
add_dependencies(
code_mainprotocol,
protocol_code,
version_number,
params,
appendix = !is.na(params)
)
Arguments
- code_mainprotocol
Protocol code of the protocol for which dependencies need to be declared in the YAML of its
index.Rmd
file- protocol_code
Character vector of protocol codes that are dependencies to the main protocol.
- version_number
Character vector of version numbers corresponding with protocol_code.
- params
List of lists with protocol-specific parameters corresponding with parameters from the protocols in protocol_code. Use
NA
if no parameters should be set for a protocol.- appendix
Logical vector indicating whether or not a dependency needs to be included as a subprotocol (at the end of the main protocol in an appendix). Default is
!is.na(params)
. Whenparams
is notNA
,appendix
will always be set toTRUE
even if the user passes another value.
See also
Other creation:
add_one_subprotocol()
,
add_subprotocols()
,
create_protocol()
,
insert_protocolsection()
,
update_protocol()
,
update_version_number()