Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevecondylios/rawr
Extract raw R code directly from webpages, including Github, Kaggle, Stack Overflow, and sites made using Blogdown.
https://github.com/stevecondylios/rawr
blogdown-sites kaggle kaggle-notebook medium r r-bloggers rawr stackoverflow towards-data-science
Last synced: 2 months ago
JSON representation
Extract raw R code directly from webpages, including Github, Kaggle, Stack Overflow, and sites made using Blogdown.
- Host: GitHub
- URL: https://github.com/stevecondylios/rawr
- Owner: stevecondylios
- License: other
- Created: 2019-09-01T00:16:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-18T16:38:43.000Z (about 3 years ago)
- Last Synced: 2024-08-13T07:15:32.401Z (5 months ago)
- Topics: blogdown-sites, kaggle, kaggle-notebook, medium, r, r-bloggers, rawr, stackoverflow, towards-data-science
- Language: R
- Homepage: https://stevecondylios.github.io/rawr/
- Size: 5.18 MB
- Stars: 15
- Watchers: 4
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - stevecondylios/rawr - Extract raw R code directly from webpages, including Github, Kaggle, Stack Overflow, and sites made using Blogdown. (R)
README
---
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```[![CRAN status](https://www.r-pkg.org/badges/version/rawr)](https://cran.r-project.org/package=rawr)
[![Travis build status](https://travis-ci.org/stevecondylios/rawr.svg?branch=master)](https://travis-ci.org/stevecondylios/rawr)`rawr` helps you quickly grab R code from the web, either straight to an R file, or to your clipboard. This avoids tedious copy/pasting of code from browser to IDE.
### R Code from Popular R websites
Retrieve R code from a website to your clipboard with `rawr_to_clip()`, here are some examples:
```R
# install.packages("rawr")
library(rawr)# CRAN vignettes
rawr_to_clip("https://cran.r-project.org/web/packages/tidytext/vignettes/tidytext.html")# Stack Overflow
rawr_to_clip("https://stackoverflow.com/questions/58248102/date-input-dt-r-shiny")# Kaggle
rawr_to_clip("https://www.kaggle.com/vrtjso/mercari-eda-more-info-than-you-can-imagine")# GitHub
rawr_to_clip("https://github.com/hadley/vis-eda/blob/master/travel.R")# Jupyter Notebook on GitHub
rawr_to_clip("https://github.com/tulip-lab/sit742/blob/master/Jupyter/SIT742P10B-MLSystem.ipynb")# Blogdown sites
rawr_to_clip("https://www.jtimm.net/2019/04/14/lexical-change-procrustes/")```
### Other functionality
Write output to a temp file
```R
rawr("https://www.kaggle.com/vrtjso/mercari-eda-more-info-than-you-can-imagine", to_file=T)
```Write output to a specific file
```R
rawr("https://www.kaggle.com/vrtjso/mercari-eda-more-info-than-you-can-imagine", file_path="mynewfile.R")
```# Issues and Feature Requests
When reporting an issue, please include:
* Example code that reproduces the **observed** behavior.
* An explanation of what the **expected** behavior is.
* A specific url you're attempting to retrieve R code from (if that's what your issue concerns)For feature requests, raise an issue with the following:
* The desired functionality
* Example inputs and desired output# Pull Requests
Pull requests are welcomed. Before doing so, please create an issue or email me with your idea.
Any new functions should follow the conventions established by the the package's existing functions. Please ensure
* Functions are sensibly named
* The __intent__ of the contribution is clear
* At least one example is provided in the documentation