medium: Retrieve r code from Medium article or Towards Data Science...

Description Usage Arguments Value Examples

View source: R/medium.R

Description

Retrieve r code from Medium article or Towards Data Science article

Usage

1
medium(url, method, padding)

Arguments

url

Link to a medium or towards data science article

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.

Value

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.

Examples

1
2
3
library(dplyr)
url <-"https://medium.com/@data_datum/ggplot2-or-how-to-make-fancy-graphics-with-r-fabae7fc16d4"
medium(url)

rawr documentation built on May 17, 2021, 5:07 p.m.

Related to medium in rawr...