optimize: Optimize Node and Centroid Positions in ENA Set

View source: R/piped.R

optimizeR Documentation

Optimize Node and Centroid Positions in ENA Set

Description

This function computes and assigns node positions and centroids for an ENA set object using the current points and rotation information.

Usage

optimize(x, weights = NULL)

Arguments

x

An ena.set object for which to optimize node and centroid positions.

weights

Optional. A numeric matrix of connection weights. If provided, the function will use this matrix instead of the connection counts from the ena.set.

Value

The input ena.set object with updated node and centroid positions.

Examples

# Assuming 'set' is an ena.set object:
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() |>
  rotate() |>
  project() |>
  optimize()

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