Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 📚
- Host: GitHub
- URL: https://github.com/amrrs/randquotes
- Owner: amrrs
- Created: 2018-05-07T20:37:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-25T19:11:39.000Z (about 5 years ago)
- Last Synced: 2024-10-28T17:32:18.517Z (23 days ago)
- Topics: r, r-package, rstats
- Language: R
- Homepage:
- Size: 37.1 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- Code of conduct: CODE_OF_CONDUCT.md
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 QuoteSometimes 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.