Learn R Programming

descsuppR (version 1.2)

testWrapper: Collect Warnings From Runnning testfun

Description

wrap this around 'correlation' tests to get output formatted for buildDescrTbl

Usage

testWrapper(testfun, values, grouping, ignore_test_errors = FALSE, ...)

Value

list. the results from testfun plus the element 'warnings' containing all warnings collected from the run of testfun. the results from testfun are assumed to be of type list and are additionally assumed to contain at least the elements 'p.value' and 'method'.

Arguments

testfun

character or function. Which function to call.

values

vector. The values to compare (age, toxicity score, gene expression, ...)

grouping

vector of the same length as values. treated as factor giving the group membership

ignore_test_errors

logical. If TRUE returns an empty test results (as list).

...

additional parameters. are passed on to the testfun

Author

Andreas Leha

Details

This function is called by buildDescrTbl in order to generate the comparison p values. Basically it just calls the provided testfun. Main purpose is, that it collects warnings and returns them as well.