dtrials: Completes a simulated drop test.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/dtrials.R

Description

dtrials returns simulated bernoulli trials (drops) that compose one drop test.

Usage

1
2
dtrials(q, max.trials = 20, fail.criteria = 1,
  data.structure = "data.table")

Arguments

q

Integer. Specifies the probability that a reaction occurs. A reaction is interpreted as a failure therfore q is the probability of failure for the bernoulli trials. Probability of success would be p = 1 - q. See https://en.wikipedia.org/wiki/Bernoulli_trial

max.trials

Integer. The maximum number of bernoulli trials to perform. where each trial represents one drop of the impactor onto a sample. Trials performed will always be less than or equal to max.trials. Default is 20.

fail.criteria

Integer. Specifies number of reactions (failures) that can occur before an entire test is considered a failure. Must be less than or equal to max.trials. Default is 1.

data.structure

Instructs function to return result as a data.table or list. Default is data.table.

Note: Other functions in this package only work with data.tables. List is an option strictly for future flexibility.

Value

A data table or list. Containing the following elements:

Author(s)

Chad Ross chad.ross@gmail.com

See Also

droptest

Examples

1
2
3
4
5
6
  dtrials(0.05)
  dtrials(0.05, max.trials = 60)
  dtrials(0.05, fail.criteria = 2)
  dtrials(0.05, max.trials = 60, fail.criteria = 2)
  dtrials(0.05, data.structure = "list")
  

droptest documentation built on May 1, 2019, 10:14 p.m.

Related to dtrials in droptest...