Learn R Programming

orchaRd (version 2.2.1)

.trimws_col: Trim whitespace from a single column in a data frame

Description

Strips leading and trailing whitespace from character or factor columns. This prevents mismatches between moderator levels, mod.order values, and model coefficient names (e.g., "Echinodermata " vs "Echinodermata").

Usage

.trimws_col(x)

Value

The same vector with whitespace trimmed (character/factor only).

Arguments

x

A vector (character, factor, or other type).