do_it: Repeats a process many times and returns a vector of results

View source: R/SDS100_do_it.R

do_itR Documentation

Repeats a process many times and returns a vector of results

Description

Repeats a process many times and returns a vector of results

Usage

do_it(n = 1L)

Arguments

n

The number of times to repeat the process.

null_dist

A vector of data consistent with a null hypothesis.

lower.tail

A Boolean indicating whether one should return the proportion of points less than or equal to the obs_stat value.

Note

This is a simplified version of the mosiac do() that returns a vector only. The idea and code are based on the mosaic do() function, which can be found on github page at: https://github.com/ProjectMOSAIC/mosaic/blob/master/R/do.R The code uses S4 objects.

Examples

 many_hellos <- do_it(10) * { "hello" }


emeyers/SDS100 documentation built on April 28, 2024, 5:07 p.m.