kaggle: Retrieve raw R code from a kaggle notebook

Description Usage Arguments Value Examples

View source: R/kaggle.R

Description

Retrieve raw R code from a kaggle notebook

Usage

1
kaggle(url, method, padding)

Arguments

url

Link to a kaggle notebook

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. Returned value will contain rmarkdown or python code if that was the language used in the kaggle notebook.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(dplyr)
kaggle("https://www.kaggle.com/vrtjso/mercari-eda-more-info-than-you-can-imagine")
kaggle("https://www.kaggle.com/captcalculator/a-very-extensive-mercari-exploratory-analysis")
kaggle("https://www.kaggle.com/adityaecdrid/mnist-with-keras-for-beginners-99457")

# Same as above but provided to cat for easy viewing

# R
kaggle("https://www.kaggle.com/vrtjso/mercari-eda-more-info-than-you-can-imagine")  %>%
  cat

# rmarkdown
kaggle("https://www.kaggle.com/captcalculator/a-very-extensive-mercari-exploratory-analysis") %>%
  cat

# python
kaggle("https://www.kaggle.com/adityaecdrid/mnist-with-keras-for-beginners-99457") %>%
  cat

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

Related to kaggle in rawr...