Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/amrrs/randquotes

📚 Get Random quotes from Quotes on Design API 📚
https://github.com/amrrs/randquotes

r r-package rstats

Last synced: 5 days ago
JSON representation

📚 Get Random quotes from Quotes on Design API 📚

Awesome Lists containing this project

README

        

---
output: rmarkdown::github_document
---

# randquotes

[![Build Status](https://travis-ci.org/amrrs/randquotes.svg?branch=master)](https://travis-ci.org/amrrs/randquotes) [![codecov](https://codecov.io/gh/amrrs/randquotes/branch/master/graph/badge.svg)](https://codecov.io/gh/amrrs/randquotes) [![CRAN status](https://www.r-pkg.org/badges/version/randquotes)](https://cran.r-project.org/package=randquotes) [![DOWNLOADSTOTAL](https://cranlogs.r-pkg.org/badges/grand-total/randquotes)](https://cranlogs.r-pkg.org/badges/grand-total/randquotes) [![Rdoc](http://www.rdocumentation.org/badges/version/randquotes)](http://www.rdocumentation.org/packages/randquotes)

## Description

This package connects to the site that uses the WordPress JSON REST API to provide a way for you to grab quotes.

## Overview

This package contains the following function:
`randquote()` that fetches a random quote and returns a dataframe along with the author name and link to the quote.

## Installation

The stable version of `randquotes` can be installed from CRAN:

```{r eval=FALSE}
install.packages("randquotes")
```

And the development version can be installed from github:

```{r eval=FALSE}
devtools::install_github("amrrs/randquotes")
```

```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
options(width=120)
```

### Note

This package fetches data from API hence an active internet connection is required for this package to function.

## Current Version

```{r message=FALSE, warning=FALSE, error=FALSE}
library(randquotes)

# current verison
packageVersion("randquotes")

```

## Usage

### Get Random Quote

```{r}
library(randquotes)

randquote()
```
### Get only the Quote

Sometimes you may not be interested in getting a dataframe that has ID and link, so this function `randquote_simple()` outputs only the quote with author name.

```{r}
library(randquotes)

cat(randquotes::randquote_simple())
```

## Courtesy

This R package is powered by [Quotes on Design API](https://quotesondesign.com/api/)

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](https://github.com/amrrs/randquotes/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.