errDist: errDist

View source: R/psychReportData.R

errDistR Documentation

errDist

Description

Returns a random vector of 0's (correct) and 1's (incorrect) with defined proportions (default = 10% errors).

Usage

errDist(n = 10000, proportion = 10)

Arguments

n

Number

proportion

Approximate proportion of errors in percentage

Value

double

Examples

# Example 1: approx 10% errors
x <- errDist(1000)
table(x)

# Example 2: approx 20% errors
x <- errDist(1000, 20)
table(x)

psychReport documentation built on Sept. 9, 2022, 5:08 p.m.