Description Usage Arguments Value Examples
View source: R/stackoverflow.R
Retrieve raw R code from Stack Overflow website
1 | stackoverflow(url, method, padding)
|
url |
Link to a page on Stack Overflow website (or any Stack Exchange) |
method |
Not all websites are formatted consistently. To overcome this, try a different method by setting the 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. |
A character vector of length 1 containing the R code from the target url. All code at the target url (including javascript, ruby, python) will be returned.
1 2 3 4 5 6 7 8 9 | ## Not run:
library(dplyr)
stackoverflow("https://stackoverflow.com/questions/58248102/date-input-dt-r-shiny")
# Same as above but provided to cat for easy viewing
stackoverflow("https://stackoverflow.com/questions/58248102/date-input-dt-r-shiny") %>%
cat
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.