constructDataSkeleton: Construct skeleton of a data set

View source: R/constructDataSkeleton.R

constructDataSkeletonR Documentation

Construct skeleton of a data set

Description

Representing the structure of a data set without including any observation of the data frame. Numerical values are uniformly drawn between 'min(x) - sm' and 'max(x) + sm' where 'sm' is a "safety margin" to not get insights about the minimum and maximum of a feature. Categorical features first contains the factor levels to ensure all levels in the skeleton. The remaining observations are then filled by randomly sampling from the factor levels.

Usage

constructDataSkeleton(dat, n = NULL, sm = 0.01, handler = warning, ...)

Arguments

dat

['data.frame()'] Data set for which the skeleton is calculated

n

['integer(1L)'] Number of observations of the skeleton. The default equals the maximal number of factor levels.

sm

['numeric(1L)'] Fraction of the range used as safety margin (default 'sm = 0.01').

handler

['function'] Function used as feedback if a feature cannot be processed. Default is 'handler = warning' which prints a warning. The first argument of the handler is a string naming the feature which cannot be processed.

...

Additional arguments passed to 'handler'.

Value

Skeleton 'data.frame'

Examples

constructDataSkeleton(iris, n = 10L)

difuture-lmu/rmmodeldata documentation built on July 14, 2022, 4:49 a.m.