factorizeNonNumericColumns: Turn non-numeric columns into factors

View source: R/Functions.R

factorizeNonNumericColumnsR Documentation

Turn non-numeric columns into factors

Description

Given a data frame, this function turns non-numeric columns into factors.

Usage

factorizeNonNumericColumns(data)

Arguments

data

A data frame. Non-data frame inputs (e.g., a matrix) are coerced to a data frame.

Details

A column is considered numeric if its storage mode is numeric or if it is a character vector, it only contains character representations of numbers and possibly missing values encoded as "NA", "NULL", "NO DATA".

Value

The input data frame with non-numeric columns turned into factors.

Author(s)

Peter Langfelder


WGCNA documentation built on Sept. 18, 2024, 5:08 p.m.