# NOT RUN {
## Simple Example
# Assume 500 invoices
mydata <- data.frame(book.value=
round(c(runif(n=480, min=10,max=20000),
runif(n=20, min=15000,max=50000)))
)
# Plan a sample and cache it
plan <- MUS.planning(data=mydata,
tolerable.error=50000, expected.error=3000)
# Extract a sample and cache it
extract <- MUS.extraction(plan, obey.n.as.min=TRUE)
# Create a new plan
new_plan <- MUS.planning(data=mydata,
tolerable.error=50000, expected.error=5000)
# extends the sample using the new plan
extended <- MUS.extend(extract, new_plan)
# extends the sample by 20 itens using the original plan
extended20 <- MUS.extend(extract, additional.n=20)
# }
Run the code above in your browser using DataLab