insert_reference | R Documentation |
Inserts references into help files in markdown format. The function takes the a single score name and returns the reference in markdown format.
insert_reference(name, tbl_ref_name = "tbl_ref")
name |
character, The name of the score to insert the reference for. |
tbl_ref_name |
character, The name of the reference table object in the environment. |
It is expected to have a table with the following columns in environment:
name
: The name of the scores
authors
: The authors of the paper
year
: The year of publication
title
: The title of the paper
journal
: The journal where the paper was published
volume_page
: The volume and page number of the paper, optional, can be
""
if not available
doi
: The DOI of the paper, optional, can be ""
if not available
character (vector). The reference in markdown format.
tbl_ref <- tibble::tibble(
name = c("score1", "score1", "score2"),
authors = c(
"Smith, B., Jones, A.",
"Simon, J., Norman, D. A.",
"Smith, B., Jones, A., Simon, J., Norman, D. A."
),
year = c(2020, 2021, 2022),
title = c(
"Title of the First Paper",
"Title of the Second Paper",
"Title of the Third Paper"
),
journal = c("Journal A", "Journal B", "Journal C"),
volume_page = c("1(1): 1-10", "", "3(3): 21-30"),
doi = c("https://10.1234/abc", "https://10.1234/def", "")
)
insert_reference("score1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.