Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jimrothstein committed Jan 30, 2025
1 parent f153a58 commit 7a80dae
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions datasetjson_play/10_datasetjson_vignette.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
```{r}
# ------------------------ PURPOSE:
# follow vignette: begin with R table (iris) and convert to json
library(datasetjson)
# iris_items now exists (loads from data.R)
is.null(iris_items)
iris_items
# but i don't see it
ls()
objects()
search()
#
# why getting error re: columns?
ds_json <- datasetjson::dataset_json(head(iris, 5),
item_oid = "IG.IRIS",
name = "IRIS",
dataset_label = "Iris",
columns = iris_items
)
ds_json
# do not give file location
js_text <- write_dataset_json(ds_json, pretty=TRUE)
# SEE the json output
cat(js_text)
```

0 comments on commit 7a80dae

Please sign in to comment.