Description Usage Arguments Value Examples
This function fetches code chunks from a vector of urls (where
code is assumed to be tagged <pre>, <code> or <textarea>).
The function uses a pretrained random forest classifier to calculates the
probability that the code is R, Python or neither.
1 |
url |
Either a character vector containing urls, or a list containing
|
show_progress |
Boolean flag, defaults to |
A tibble containing the probability that the input url contains R
code (column r), Python code (column py) or another code type
(column other). If no code can be found the probability vector will
be 0. If there are problems fetching data from a url, the NAs will be returned
instead of classification probabilities.
1 2 3 4 | # not run:
# rorpy("https://google.com") # no code here...
# rorpy("http://dplyr.tidyverse.org") # 99\% sure it's R.......
# rorpy("https://keras.io") # also about 99\% sure it's python
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.