Description Usage Arguments Value Examples
Retrieve raw R code from any github, kaggle, stack overflow, blogdown, or data camp web page
1 | rawr_to_clip(url, method, padding)
|
url |
Link to an R file on supported website (github, kaggle, datacamp, tidytext) |
method |
Not all websites are formatted consistently. To overcome this, rawr may have more than one method for any site. If what rawr returns is not sensible, try setting method parameter to integers 2 and greater to try other available methods |
padding |
Specify what goes between the last character of one code block and the first character of the next code block. Default is a two new lines, which appears visually as one new line between code blocks. |
The raw R code from the URL provided written to the system clipboard (and so can be pasted in the usual way with ctrl + v / cmd + v). No object is returned to the R interpreter.
1 2 3 4 5 | library(dplyr)
rawr_to_clip("https://cran.r-project.org/web/packages/tidytext/vignettes/tidytext.html")
# Also works with the magrittr pipe
"https://github.com/hadley/vis-eda/blob/master/travel.R" %>% rawr_to_clip
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.