as_CGNM_result_S4: Convert a classic CGNM result list into a 'CGNM_result' S4...

View source: R/CGNM_result-class.R

as_CGNM_result_S4R Documentation

Convert a classic CGNM result list into a CGNM_result S4 object

Description

Cluster_Gauss_Newton_method(), Cluster_Gauss_Newton_Bootstrap_method(), and Cluster_Gauss_Newton_EBE_method() all accept an outputS4 = TRUE argument that does this conversion automatically. Use as_CGNM_result_S4() directly when you have an existing classic list result (for example one loaded from an older saved .RDATA file) that you want to convert after the fact. Calling it on an object that is already a CGNM_result S4 object returns that object unchanged.

Usage

as_CGNM_result_S4(CGNM_result_list)

Arguments

CGNM_result_list

(required input) a list, or a CGNM_result S4 object the classic list returned by Cluster_Gauss_Newton_method (or the bootstrap/EBE variants).

Value

a CGNM_result S4 object exposing the same fields via $/[[.

Examples

model_function <- function(x) x
CGNM_result <- Cluster_Gauss_Newton_method(
  nonlinearFunction = model_function, targetVector = c(1, 2, 3),
  initial_lowerRange = rep(0.1, 3), initial_upperRange = rep(10, 3),
  num_iteration = 2, num_minimizersToFind = 5, saveLog = FALSE)
CGNM_result_S4 <- as_CGNM_result_S4(CGNM_result)
CGNM_result_S4$X

CGNM documentation built on Sept. 13, 2026, 9:06 a.m.