genIndepDepJson: Generate Body for the POST Function of Uncovr

View source: R/genIndepDepJson.R

genIndepDepJsonR Documentation

Generate Body for the POST Function of Uncovr

Description

This is an internal function used by buildModelData function.

Usage

genIndepDepJson(numOfObs, numOfVars)

Arguments

numOfObs

A number. This represents the number of observations in the data. In other words, the number of rows of data that are requested to be generated. The numOfObs argument must be a non-negative integer.

numOfVars

A number. This represents the number of variables in the data. In other words, the number of columns of data that are requested to be generated. The numOfVars argument must be a non-negative integer.

Details

This function is one of the core functions for the generation of data that comprises of independent and dependent variables. The purpose of this function can be best understood when explained within the context that is given below. There is a closed source SaaS(Software as a Service) software named uncovr that provides an API(Application Programming Interface). In its current state, the SaaS software is free to use with some constraints around the volume of data and the frequency of API calls. One of the functions of uncovr API takes an input of number of observations i.e. rows and number of independent variables namely columns and gives an output. The input of the uncovr function is required to be sent as part of the body of the html POST functionality. This function genIndepDepJson creates the json in the form required by uncovr API.

Value

A json with the details of independent variable and the dependent variable. The format of this json is as required by the uncovr api end point.


conjurer documentation built on May 1, 2022, 9:05 a.m.