hidden: hidden: A package for detecting hidden types.

Description hidden contains the following functions

Description

This package makes it easy to identify objects or object elements which store a simpler hidden type. "Hidden type" refers to a simpler type or class that we could convert an object to without losing information. Additionally the functions unfactor and make_logical allow for the quick conversions that base R doesn't.

hidden contains the following functions

hides_df

TRUE if list or environment contains only objects of same length.

hides_int

TRUE if numeric, character or factor could be converted to integer without loss of information.

hides_lgl

TRUE if numeric, character or factor contains binary values that could be converted to logical without loss of information other than labels (see also make_logical).

hides_mat

TRUE if data frame, list or environment contain only objects of same length and same type.

hides_num

TRUE if character or factor could be converted to numeric without loss of information.

hides_vec

TRUE if data.frame list or environment contains only objects of length 1.

make_logical

Convert to logical if hides_lgl(x, ...) is TRUE.

unfactor

Convert a factor or the factors of a data.frame, list or environment to the type they hide (character or numeric)


moodymudskipper/hidden documentation built on May 20, 2019, 9:59 a.m.