center: Center ENA Data

View source: R/piped.R

centerR Documentation

Center ENA Data

Description

This function centers the line weights of an 'ena.set' by subtracting the mean of each connection from all units. This is a standard step in preparing data for rotation.

Usage

center(x, add.meta = TRUE)

Arguments

x

An 'ena.set' object (typically after 'sphere_norm()') or a numeric matrix.

add.meta

A logical value. If 'TRUE' (the default), metadata is preserved. Ignored if 'x' is a matrix.

Value

If 'x' is an 'ena.set', it returns the modified 'ena.set' with the centered data stored in 'x$model$points.for.projection'. If 'x' is a matrix, it returns a centered matrix.

Examples

data(RS.data)

codes <- c("Data", "Technical.Constraints", "Performance.Parameters",
           "Client.and.Consultant.Requests", "Design.Reasoning",
           "Collaboration")
units <- c("Condition", "UserName")
horizon <- c("Condition", "GroupName")
enaset <- RS.data |>
  accumulate(units, codes, horizon) |>
  sphere_norm() |>
  center()

rENA documentation built on Nov. 5, 2025, 5:50 p.m.