centfac: Numeric Centered Factor Levels

View source: R/panel.groups.segplot.R

centfacR Documentation

Numeric Centered Factor Levels

Description

This function receveis a factor and return a numeric vector with equally spaced factor levels centered at 0. stolen from https://github.com/walmes/wzRfun/blob/master/R/panel.groups.segplot.R

Usage

centfac(group, space = NULL)

Arguments

group

A factor.

space

A numeric value to be used as the space between levels. If NULL, the space is determined by the group.

Author(s)

Walmes Zeviani, walmes@ufpr.br.

Examples


centfac(warpbreaks$tension)
centfac(warpbreaks$tension, space = 1)
centfac(warpbreaks$wool)
centfac(warpbreaks$wool, space = 1)


stp4/stp25plot documentation built on March 29, 2025, 4:26 p.m.