Created
July 26, 2012 20:35
-
-
Save rmflight/3184342 to your computer and use it in GitHub Desktop.
Rmd programmatic links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{r showLink, results='asis'} | |
var1 <- "672" | |
var2 <- "12189" | |
srchVar <- paste(var1, var2, collapse=",", sep=",") | |
tmp1 <- paste('<a href="http://www.ncbi.nlm.nih.gov/gene?term=', srchVar, '">Results</a>', sep="") | |
cat(tmp1) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can make it more compact and readable:
It is simple just because the coincidence that the knitr
inline
hook function usespaste(..., collapse = ', ')
which happens to be valid for the URL for your case.