https://github.com/hrbrmstr/forcequotes
⊩Retrieve and optionally display to the console random quotes from Star Wars films
https://github.com/hrbrmstr/forcequotes
r rest-api rstats star-wars
Last synced: about 1 year ago
JSON representation
⊩Retrieve and optionally display to the console random quotes from Star Wars films
- Host: GitHub
- URL: https://github.com/hrbrmstr/forcequotes
- Owner: hrbrmstr
- Created: 2019-01-12T20:24:04.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-12T21:02:57.000Z (about 7 years ago)
- Last Synced: 2025-01-16T02:52:36.656Z (about 1 year ago)
- Topics: r, rest-api, rstats, star-wars
- Language: R
- Homepage:
- Size: 52.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
Awesome Lists containing this project
README
---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
```{r pkg-knitr-opts, include=FALSE}
knitr::opts_chunk$set(collapse=TRUE, fig.retina=2, message=FALSE, warning=FALSE)
options(width=120)
```
[](https://travis-ci.org/hrbrmstr/forcequotes)
[](https://codecov.io/gh/hrbrmstr/forcequotes)
[](https://cran.r-project.org/package=forcequotes)

# forcequotes
Return Random Star Wars Quotes
## Description
Now you can use the R 'Force' to get random quotes from your favorite
space opera. This is a thin wrapper to the 'Star Wars Quote API'
().
## What's Inside The Tin
The following functions are implemented:
- `quote_console`: Get a random Star Wars quote and display it stylishly to the console
- `random_quote: Return a Random Star Wars Quote
## Installation
```{r install-ex, eval=FALSE}
devtools::install_git("https://gitlab.com/hrbrmstr/forcequotes.git")
# or
devtools::install_github("hrbrmstr/forcequotes")
```
## Usage
```{r lib-ex}
library(forcequotes)
# current version
packageVersion("forcequotes")
```
### Basic use
```{r basics}
random_quote()
random_quote(faction=0)
random_quote(faction=1)
random_quote(faction=2)
random_quote(faction=3)
random_quote(faction=4)
```
### Console shenanigans
```{r console}
quote_console()
```
## forcequotes Metrics
```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```
## Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md).
By participating in this project you agree to abide by its terms.