Skip to content

R Package 📦 to Generate mock data with the Mockaroo API ✨

License

Notifications You must be signed in to change notification settings

lockedata/mockaRoo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages