jasp-desktop
                                
                                 jasp-desktop copied to clipboard
                                
                                    jasp-desktop copied to clipboard
                            
                            
                            
                        add power and logit transforms
closes https://github.com/jasp-stats/INTERNAL-jasp/issues/1728 closes https://github.com/jasp-stats/INTERNAL-jasp/issues/1866
Also, I was wondering if we should typeset inverse functions like invLogit like logit⁻¹(y). On the one hand, logit⁻¹(y) is more readable (at least to me), while on the other hand, it's convenient that invLogit can also be used in the R code. Then again, there are a few other symbols that cannot be typed in R either
Good point. I think the whole point of the point and click interface is to be human friendly (and not programmer friendly), so it does make sense to me to typeset it like logit⁻¹(y).
Just a question about implementation. I thought I could just change it to logit\u207B\u00B9 (assuming unicode would work). However, it seems like we did not implement the option to replace the name of the function with another string? I could only replace it with an image like for the symbols here?
https://github.com/jasp-stats/jasp-desktop/blob/7c8c2a91fc914bc3a1c3b998611517d2fe0bdaf6/Desktop/components/JASP/Widgets/FilterConstructor/Function.qml#L17
(If @vandenman does not know perhaps @JorisGoosen would). I must admit I am not happy about the prospect of making these images and in two themes 😅
I could easily add a "pretty functionname" property and then you could enter the unicode directly there?
If you can easily add that, that would be nice!
If you can easily add that, that would be nice!
I added it to stable just now, see log2 and log10 in ComputeColumnWindow.qml
For some reason I cannot build right now to test it, but the needed changes looked easy enough to make.
so this probably works, but because we no longer do library(jaspBase) by default I'm now seeing

for all our custom functions...
So... I can move https://github.com/jasp-stats/jasp-desktop/commit/e9e8011c7d663cfefc75eb3e23b05b390064b072 to stable
So... I can move https://github.com/jasp-stats/jasp-desktop/commit/e9e8011c7d663cfefc75eb3e23b05b390064b072 to stable
I don't like it, but maybe it's best to do that for now. The downside is that every module needs to be aware that they should not clash with anything in https://github.com/jasp-stats/jaspBase/blob/master/NAMESPACE, but perhaps they should do that anyway because otherwise, we need to provide syntax with jaspBase:: and jaspModule:: rather than library.
Ok, I moved the commit to stable so here it is: https://github.com/jasp-stats/jasp-desktop/commit/e4b61bc23767e1bb1c9d64b6ef6683880aed9a13
so those custom functions should work again
Now it works!
There is just some funky business going on with the pretty labels:

You can see on the right that the pretty labels are very pretty indeed, and they also look pretty if I drag them to the computation window alone, but if I drag it inside of another function, then the R function name is displayed instead of the pretty label (i.e., logit(invLogit(contNormal)) should look like logit(logit⁻¹((contNormal)))
Aah hey could you make a bug for it in 0.16.4? SHould be easy to fix but also to forget im afraid :p
Ok so this should be fine now, I guess @vandenman can give it a go once more but otherwise it should be ready
Looks good to me! The only nitpick I have is that the log2 and log10 should use subscript base rather than superscript base:

but Wikipedia (and others) do this:

Thanks for spotting that! Should be fixed now