This function is a helper to automatically generate an .R file populated with a skeleton of a typical test function compatible with flipr.

use_stat(nsamples = 1, stat_name = "mystat")

Arguments

nsamples

An integer specifying the number of samples to be used. Defaults to 1L. Currently only works for one- or two-sample problems.

stat_name

A string specifying the name of the test statistic that is being implemented. Defaults to mystat.

Value

Creates a dedicated .R file with a template of code for the function that implements the test statistic and saves it to the R/ folder of your package.

Examples

if (FALSE) {
use_stat()
}