words2link_pubmed = function(words) { code = gsub(" ", "%20", words) link = paste("https://pubmed.ncbi.nlm.nih.gov/?term=", code, "&size=200&page=", sep = "") return(link) }
sample_link = "https://pubmed.ncbi.nlm.nih.gov/?term=(PTSD%20OR%20Depression)%20AND%20Ketamine&size=200&page=" link = words2link_pubmed("(PTSD OR Depression) AND Ketamine") link identical(sample_link, link)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.