Generate mock data with the Mockaroo API
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.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.