From 1be5e28a5227408b04eac3e5780b594dff626899 Mon Sep 17 00:00:00 2001 From: Joris Goosen Date: Wed, 15 Nov 2023 17:26:59 +0100 Subject: [PATCH 1/2] add whitelist and a bit of help for https://github.com/jasp-stats/jasp-issues/issues/516 --- Common/r_functionwhitelist.cpp | 12 +++++++++++- Engine/jaspBase | 2 +- Resources/Help/other/computedcolumns.html | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Common/r_functionwhitelist.cpp b/Common/r_functionwhitelist.cpp index 251e96ee0a..64fe9f2201 100644 --- a/Common/r_functionwhitelist.cpp +++ b/Common/r_functionwhitelist.cpp @@ -245,7 +245,17 @@ const std::set R_FunctionWhiteList::functionWhiteList { "pbirthday", "ptukey", "dwilcox", - "switch" + "switch", + "rowMean", "rowMeanNaRm", + "rowSum", "rowSumNaRm", + "rowSD", "rowSDNaRm", + "rowVariance", "rowVarianceNaRm", + "rowCovariance", + "rowCorrelation", + "rowMedian", "rowMedianNaRm", + "rowMin", "rowMinNaRm", + "rowMax", "rowMaxNaRm" + #ifdef JASP_DEBUG ,"Sys.sleep", ".crashPlease", "stringi::stri_enc_mark", "stringi::stri_enc_toutf8", "Encoding" #endif diff --git a/Engine/jaspBase b/Engine/jaspBase index 7c8c5f6108..8b442af016 160000 --- a/Engine/jaspBase +++ b/Engine/jaspBase @@ -1 +1 @@ -Subproject commit 7c8c5f6108fa8bd749974d46e86b89b57f5f3e4c +Subproject commit 8b442af016a75d4b6d9199b8fbe047775f4c63b2 diff --git a/Resources/Help/other/computedcolumns.html b/Resources/Help/other/computedcolumns.html index 5bba3d59a8..f8380552fb 100644 --- a/Resources/Help/other/computedcolumns.html +++ b/Resources/Help/other/computedcolumns.html @@ -46,9 +46,18 @@

Computed Columns

There are of course many possibilities and you are only limited by the availability of (safe) functions in JASP. Should you miss something than don't hesitate to contact us so we may add it to the next version. -

- - +

+
+ Rowwise operations +

+ A special type of computed column creation only available in R is the rowwise operations of mean, variance etc.

+ These functions are:
+ rowMean, rowSum, rowSD, rowVariance, rowCovariance, rowCorrelation, rowMedian, rowMin, rowMax
+ They will probably return NA for when any of the column's rows contain one. + So there are also variants like rowMeanNaRm available that drop NA first.

+ It can be used like: rowMean(Column 1, Column 2, Column 3) +

+
From df4023b93320dc80ba37bb71c9c582845f50308e Mon Sep 17 00:00:00 2001 From: boutinb Date: Wed, 22 Nov 2023 18:00:36 +0100 Subject: [PATCH 2/2] Update jaspBase --- Engine/jaspBase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/jaspBase b/Engine/jaspBase index 8b442af016..4f85804523 160000 --- a/Engine/jaspBase +++ b/Engine/jaspBase @@ -1 +1 @@ -Subproject commit 8b442af016a75d4b6d9199b8fbe047775f4c63b2 +Subproject commit 4f858045232461d49c122a0beb828577ab1f7726