buildsim.sample {simitation}R Documentation

Internal function for Sampling Function

Description

This internal function generates samples based on the specified distributions and probabilities. It is not intended for direct usage by end-users.

Usage

buildsim.sample(
  the.formula,
  the.variable,
  n,
  num.experiments,
  value.split = ",",
  symbol.open.paren = "(",
  symbol.close.paren = ")"
)

Arguments

the.formula

A character string specifying the sampling formula, e.g., "sample(('Red', 'Green', 'Blue'), (0.5, 0.3, 0.2))".

the.variable

A character string naming the variable in the generated data.

n

An integer specifying the number of data points to generate for each experiment.

num.experiments

An integer specifying the number of experiments to simulate.

value.split

A character used to split the values in the sample.

symbol.open.paren

A character specifying the opening parenthesis.

symbol.close.paren

A character specifying the closing parenthesis.

Value

A data frame with sampled values based on the given formula.


[Package simitation version 0.0.7 Index]