#' Format publication table
#'
#' @import dplyr
format_publication_table <- function(publi_table) {
df <- publi_table %>%
arrange(desc(year)) %>%
transmute(
Journal = paper_html(journal_title_iso),
Title = title_html(title, pmid),
Year = year,
"Author rank" = sigaps_author_rank,
"Journal rank" = paper_rank,
Score = sigaps_score,
Affiliation = small_html(affiliation)
)
}
small_html <- function(text)
paste0("<small>", text, "</small>")
title_html <- function(paper_title, pmid) {
paste0(
"<a href='https://www.ncbi.nlm.nih.gov/pubmed/", pmid, "'>",
paper_title,"</a>"
)
}
paper_html <- function(paper_abbr) {
url <- paste0('https://www.ncbi.nlm.nih.gov/nlmcatalog?term="', paper_abbr, '"[Title+Abbreviation]')
paste0("<a href='", url,"'>",paper_abbr,"</a>")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.