From 82358ac0882ae35ccb28708b2ec54a110164c435 Mon Sep 17 00:00:00 2001 From: edhell Date: Wed, 31 Jul 2024 17:54:26 -0300 Subject: [PATCH] update Documentation --- DESCRIPTION | 2 +- man/format_data_json.Rd | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 73fbfe7..ecbc3f9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,7 +15,7 @@ License: file LICENSE Encoding: UTF-8 LazyData: false Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Suggests: pmml, future, diff --git a/man/format_data_json.Rd b/man/format_data_json.Rd index 5e3576d..691b3bc 100644 --- a/man/format_data_json.Rd +++ b/man/format_data_json.Rd @@ -4,17 +4,19 @@ \alias{format_data_json} \title{Format Data.Frame rows to json format} \usage{ -format_data_json(df, scr = FALSE, metadata_columns = NULL) +format_data_json(df, scr = FALSE, scr_batch = FALSE, metadata_columns = NULL) } \arguments{ \item{df}{data frame to be transformed in JSON format rows} \item{scr}{boolean, if \code{TRUE} will write the new json format with metadata} +\item{scr_batch}{boolean, if \code{TRUE} will write the batch format JSON for SCR, metadata is ignored} + \item{metadata_columns}{columns names to be used as metadata. If scr is set to \code{FALSE}, metatada_columns is ignored} } \value{ -a vector of JSON strings +a vector of JSON strings or a single json string when \code{scr_batch} is set to \code{TRUE} } \description{ Viya MAS requires a very specific json format which is the goal of this function @@ -25,4 +27,10 @@ to create json_output <- format_data_json(mtcars) json_output +json_output <- format_data_json(mtcars, scr = TRUE) +json_output + +json_output <- format_data_json(mtcars, scr_batch = TRUE) +jsonlite::prettify(json_output) + }