dataframe-utils {iSEE}R Documentation

Class utilities

Description

.findAtomicFields: A utility function to find columns in a data.frame or DataFrame that are atomic R types, as most of the app does not know how to handle more complex types being stored as columns. An obvious example is in data.frames expected by ggplot or datatable.

Usage

.findAtomicFields(x)

.whichGroupable(x)

.whichNumeric(x)

Arguments

x

A data.frame or DataFrame.

Details

.whichNumeric: Identify continuous columns that can be used as options in various interface elements, e.g., for sizing. This is typically called in .cacheCommonInfo for later use by methods of .defineInterface.

.whichGroupable: Identify categorical columns that can be used as options in various interface elements, e.g., for faceting or shaping. This is typically called in .cacheCommonInfo for later use by methods of .defineInterface.

Value

.findAtomicFields: A character vector of names of atomic fields in x.

.whichGroupable: An integer vector containing the indices of the categorical columns.

.whichNumeric: An integer vector containing the indices of the numeric columns.

Author(s)

Aaron Lun, Kevin Rue-Albrecht, Charlotte Soneson

Examples

x <- DataFrame(
    A = rnorm(10),
    B = sample(letters, 10),
    DataFrame = I(DataFrame(
        C = rnorm(10),
        D = sample(letters, 10)
    ))
)

.findAtomicFields(x)
.whichGroupable(x)
.whichNumeric(x)

[Package iSEE version 2.0.0 Index]