SIPlibrary3json: JSON SIPLibrary 3.0 Generator

Description Usage Arguments Value Examples

View source: R/SIPlibrary3json.R

Description

Takes a data.frame and an optional data.frame containing metadata and coverts it to a .json format PM.org 3.0 Standard Library readable by ChanceCalc and any .json library reader.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SIPlibrary3json(
  DATAFRAME,
  filename,
  author,
  METADF = NULL,
  seeds = "generate",
  bounds = c(0, 1),
  boundedness = "u",
  term_saved = 5
)

Arguments

DATAFRAME

Data.frame containing data or SIPs.

filename

Character, ending in ".json"

author

Character.

METADF

Data.frame with named rows of same length as DATAFRAME.

seeds

Optional data.frame input for the HDR seeds. Default is "generate", which calls the HDRSeeds function to generate statistically independent seeds.

bounds

Passed to metalog function, numeric vector specifying lower or upper bounds, none required if the distribution is unbounded.

boundedness

Passed to metalog function, character string specifying unbounded, semi-bounded upper, semi-bounded lower or bounded; accepts values u, su, sl and b (default: 'u').

term_saved

Passed to metalog function, a value between 3 and 16 for the number of terms desired for all SIPs. Default is 5.

Value

Completion notification, file output to WD

Examples

1
2
3
4
5
6
7
8
9
testdf <- data.frame(SIP_1 = rnorm(5000),
SIP_2 = rnorm(5000),
SIP_3 = rnorm(5000),
SIP_4 = rnorm(5000),
SIP_5 = rnorm(5000))

testmeta <- sapply(testdf, FUN = summary)

SIPlibrary3json(testdf, "finaltesting.xlsx", "Aaron Brown", testmeta)

probability-management/RSIPlibrary documentation built on June 2, 2021, 10:19 p.m.