View source: R/rmd_code_block.R
rmd_code_block | R Documentation |
RStudio add-in to insert selected lines into code block:
rmd_code_block()
- verbatim code block.
Note: in Markdown Visual Editor mode does not work.
rmd_code_block_r()
- R code block.
Note! In Markdown Visual Editor (MVE) mode works differently:
in MVE mode, RStudio IDE command
insertChunk
is executed, which currently means that non-selected text will not
be included in the chunk automatically. If the chunk is included as
the last line of the document in MVE mode, the selected text is
interpreted as chunk options, otherwise as chunk contents.
rmd_code_block_r_split()
- splits block of R code.
These functions internally use function
addin.tools::rs_enclose_selected_rows_with()
-
that adds lines above and below the selection.
rmd_code_block_r(context = rs_get_context())
rmd_code_block_python(context = rs_get_context())
rmd_code_block_sql(context = rs_get_context())
rmd_code_block(context = rs_get_context())
rmd_code_block_r_split(context = rs_get_context())
context |
(class |
Other R Markdown formatting add-ins:
format_rmd
,
rmd_equations
,
rmd_list()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.