Learn R Programming

rENA (version 0.3.0)

optimize: 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)

Value

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

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.

Examples

Run this code
# 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()

Run the code above in your browser using DataLab