From 61b3577a52126b2ee97ff8b7fb7bfb3960137c99 Mon Sep 17 00:00:00 2001 From: Julius Pfadt Date: Fri, 1 Mar 2024 12:04:23 +0100 Subject: [PATCH] try Joris changes --- R/principalcomponentanalysis.R | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/R/principalcomponentanalysis.R b/R/principalcomponentanalysis.R index 8bd88450..9b59832f 100644 --- a/R/principalcomponentanalysis.R +++ b/R/principalcomponentanalysis.R @@ -646,22 +646,20 @@ principalComponentAnalysisInternal <- function(jaspResults, dataset, options, .. scores <- modelContainer[["model"]][["object"]][["scores"]] baseNames <- gettextf("Component_%s", seq_len(ncol(scores))) - encodedNames <- jaspBase::createColumns(baseNames) + # encodedNames <- jaspBase::createColumns(baseNames) # print(length(container[[""]])) - if (length(encodedNames) == length(baseNames)) { + # if (length(encodedNames) == length(baseNames)) { for (i in seq_len(ncol(scores))) { - container[[encodedNames[i]]] <- jaspBase::createJaspColumn(encodedNames[i]) - container[[encodedNames[i]]]$setScale(scores[, i]) + container[[baseNames[i]]] <- jaspBase::createJaspColumn(baseNames[i]) + container[[baseNames[i]]]$setScale(scores[, i]) } jaspResults[["addedScoresContainer"]] <- container - } else { - container <- NULL - jaspResults[["addedScoresContainer"]] <- NULL - } - - + # } else { + # container <- NULL + # jaspResults[["addedScoresContainer"]] <- NULL + # } return()