From 745f983b20c7b42da8531985bf82e40f7d6e1d1b Mon Sep 17 00:00:00 2001 From: Julius Pfadt <38500953+juliuspfadt@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:58:36 +0200 Subject: [PATCH] Update R/confirmatoryfactoranalysis.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: František Bartoš <38475991+FBartos@users.noreply.github.com> --- R/confirmatoryfactoranalysis.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/R/confirmatoryfactoranalysis.R b/R/confirmatoryfactoranalysis.R index 25b08667..8161c2c7 100644 --- a/R/confirmatoryfactoranalysis.R +++ b/R/confirmatoryfactoranalysis.R @@ -191,8 +191,11 @@ confirmatoryFactorAnalysisInternal <- function(jaspResults, dataset, options, .. if (options$group == "") grp <- NULL else grp <- options$group if (anyNA(dataset)) { - naAction <- ifelse(options$naAction == "twoStageRobust", "robust.two.stage", - ifelse(options$naAction == "twoStage", "two.stage", options$naAction)) + naAction <- switch( + options$naAction, + "twoStageRobust" = "robust.two.stage", + "twoStage" = "two.stage", + options$naAction) } else { naAction <- "listwise" }