Description Usage Arguments Value Details Author(s) Examples
This function takes as input a data frame containing an audit population, which needs at least a column indicating the book values of the line items.
1 | random.sampling(data, bookCol, sample.size)
|
data |
A data frame containing at least the book values of the audit population. |
bookCol |
A character indicating the name of the column used for the book values. |
sample.size |
An integer representing the number of line items to sample. |
A data frame containing the sample values.
EMPTY FOR NOW
Koen Derks, k.derks@nyenrode.nl
1 2 3 4 5 6 7 8 9 10 11 12 | # Create an imaginary data set
bookValues <- rgamma(n = 2400, shape = 1, rate = 0.001)
error.rate <- 0.1
error <- sample(0:1, 2400, TRUE, c(1-error.rate, error.rate))
taint <- rchisq(n = 2400, df = 1) / 10
auditValues <- bookValues - (error * taint * bookValues)
frame <- data.frame( bookValues = round(bookValues,2),
auditValues = round(auditValues,2))
# Sample from the population
random.sampling(data = frame,
bookCol = "bookValues",
sample.size = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.