Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add whitelist and a bit of help for rowwise compcols #5323

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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>

Loading