R Package 📦 to Generate mock data with the Mockaroo API
R
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R typo fix Mar 25, 2016
man
tests
.Rbuildignore
.gitignore
.travis.yml
CONDUCT.md
DESCRIPTION
LICENSE
NAMESPACE
README.Rmd
README.md
mockaRoo.Rproj

README.md

mockaRoo

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Travis-CI Build Status Coverage Status

Generate mock data with the Mockaroo API

Development

This package is in it's infancy - if you'd like mock data in R, give your feature requests and opinions in the issue tracker.

Usage

if(!require(devtools)) install.packages("devtools")
devtools::install_github("stephlocke/mockaRoo")
library(mockaRoo)

basicSchema <- data.frame(name = "blah", percentBlank = 0, type = "Color")

response <- mockaroo("json", list(key = "48b71860", count = 10), schema = jsonlite::toJSON(basicSchema))

jsonlite::prettify(response)
#> [
#>     {
#>         "blah": "Purple"
#>     },
#>     {
#>         "blah": "Green"
#>     },
#>     {
#>         "blah": "Orange"
#>     },
#>     {
#>         "blah": "Mauv"
#>     },
#>     {
#>         "blah": "Red"
#>     },
#>     {
#>         "blah": "Khaki"
#>     },
#>     {
#>         "blah": "Pink"
#>     },
#>     {
#>         "blah": "Blue"
#>     },
#>     {
#>         "blah": "Teal"
#>     },
#>     {
#>         "blah": "Indigo"
#>     }
#> ]
#> 

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.