Skip to content

Commit

Permalink
add whitelist and a bit of help for jasp-stats/jasp-issues#516
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisGoosen committed Nov 15, 2023
1 parent 687687f commit 1be5e28
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
12 changes: 11 additions & 1 deletion Common/r_functionwhitelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,17 @@ const std::set<std::string> 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
Expand Down
2 changes: 1 addition & 1 deletion Engine/jaspBase
15 changes: 12 additions & 3 deletions Resources/Help/other/computedcolumns.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,18 @@ <h1>Computed Columns</h1>
</li>
</ul>
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.
</p>


</p>
</details>

<details>
<summary><b>Rowwise operations</b></summary>
<p>
A special type of computed column creation only available in R is the rowwise operations of mean, variance etc.<br><br>
These functions are:<br>
<code>rowMean, rowSum, rowSD, rowVariance, rowCovariance, rowCorrelation, rowMedian, rowMin, rowMax</code><br>
They will probably return NA for when any of the column's rows contain one.
So there are also variants like <code>rowMeanNaRm</code> available that drop NA first.<br><br>
It can be used like: <code>rowMean(Column 1, Column 2, Column 3)</code>
</p>
</details>

0 comments on commit 1be5e28

Please sign in to comment.