is.dummy: Tests if a vector is a dummy column

Description Usage Arguments Value

View source: R/utilities.r

Description

This function identifies specifically columns with dummy variables (only 0 and 1) from all other column types. 1.0 as single value returns TRUE, which is a matter of print formatting rather of type.

Usage

1

Arguments

x

the vector to be tested, use 'sapply(x, is.wholenumber)' for a data frame. Strict testing using 'vapply(x, FUN = is.dummy, FUN.VALUE = logical(1)'

Value

A logical vector returning TRUE for column(s) that only contain 0 and/or 1


RJ333/phyloseq2ML documentation built on June 2, 2020, 9:25 p.m.