https://github.com/aephidayatuloh/rpubs
Package for extract code from RPubs article
https://github.com/aephidayatuloh/rpubs
Last synced: 3 months ago
JSON representation
Package for extract code from RPubs article
- Host: GitHub
- URL: https://github.com/aephidayatuloh/rpubs
- Owner: aephidayatuloh
- Created: 2020-01-13T03:39:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-16T15:38:17.000Z (over 4 years ago)
- Last Synced: 2024-08-13T07:11:14.561Z (6 months ago)
- Language: R
- Homepage:
- Size: 35.2 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - aephidayatuloh/rpubs - Package for extract code from RPubs article (R)
README
# rpubs : Extract code from RPubs article
[](https://travis-ci.org/aephidayatuloh/rpubs)[RPubs.com](https://rpubs.com) is a web publishing service for R articles created from R Markdown. When you find some interesting article, may be you want to copy the script to try reproduce on your local machine. The `rpubs` package can help you to automatically copy and paste the script (or with the output) without you have to do it manually.
## Install
```
# install.packages("devtools")
devtools::install_github("aephidayatuloh/rpubs")
```## Usage
```
library(rpubs)
article <- "https://rpubs.com/aephidayatuloh/sendgmail"
rpubs_code(url = article, path = "myfolder/sendgmail.R", output = FALSE)
```If you run the code above, after the process finished you will have the script file named `sendgmail.R` in `myfolder` folder. But, if the script in the article in a output-block part (this usually in a box with white background, different writing style from writer) then use `output = TRUE` to make the output-block part of script output file.