View source: R/display.statistical.result.R
display.statistical.result | R Documentation |
A utility function to display statistical result in a plot in scientific notation (when appropriate)
display.statistical.result(
x,
lower.cutoff = 2.2e-50,
scientific.cutoff = 0.001,
digits = 2,
statistic.type = 'P',
symbol = ': '
);
x |
Numeric value to be displayed |
lower.cutoff |
For values of x smaller than lower.cutoff, the return value will be "< lower.cutoff". Defaults to 2.2e-16 |
scientific.cutoff |
For values of x larger or equal to scientific.cutoff, standard notation will be used (rather than scientific notation). Defaults to 0.001 |
digits |
Number of decimal places of precision to be shown |
statistic.type |
Type of statistic to be displayed, defaults to āPā. |
symbol |
Symbol prior to statistic to be displayed, defaults to ā: ā. |
Returns an expression
Nathalie Moon
scientific.notation
set.seed(100);
display.statistical.result(x = 0.00000000000000000000234);
display.statistical.result(x = 0.023, statistic.type = 'Q');
display.statistical.result(x = 0.001, scientific.cutoff = 0.01, symbol = ' = ');
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.