Learn R Programming

rtables (version 0.6.6)

simple_analysis: Default tabulation

Description

This function is used when analyze is invoked

Usage

simple_analysis(x, ...)

# S4 method for numeric simple_analysis(x, ...)

# S4 method for logical simple_analysis(x, ...)

# S4 method for factor simple_analysis(x, ...)

# S4 method for ANY simple_analysis(x, ...)

Value

an RowsVerticalSection object (or NULL). The details of this object should be considered an internal implementation detail.

Arguments

x

the already split data being tabulated for a particular cell/set of cells

...

passed on directly

Author

Gabriel Becker and Adrian Waddell

Details

This function has the following behavior given particular types of inputs:

numeric

calls mean on x

logical

calls sum on x

factor

calls length on x

in_rows is called on the resulting value(s).

All other classes of input currently lead to an error.

Examples

Run this code
simple_analysis(1:3)
simple_analysis(iris$Species)
simple_analysis(iris$Species == "setosa")

Run the code above in your browser using DataLab