respect types and preload data#363
Conversation
vandenman
left a comment
There was a problem hiding this comment.
some suggestions above, still have to test this in jasp and look at the mode.
R/descriptives.R
Outdated
| # need some help here @vandenman | ||
| # modeType <- switch(columnType, | ||
| # "scale" = "number", | ||
| # "ordinal" = "integer", | ||
| # "nominal" = "string") | ||
| # resultsCol[["Mode"]] <- createMixedRow( | ||
| # value = mode[1L], | ||
| # type = modeType | ||
| # ) |
There was a problem hiding this comment.
yeah I'll try to get this to work.
Co-authored-by: Don van den Bergh <donvdbergh@hotmail.com>
Co-authored-by: Don van den Bergh <donvdbergh@hotmail.com>
Co-authored-by: Don van den Bergh <donvdbergh@hotmail.com>
|
@vandenman I now incorporated all suggestions, so what's left is that column mode thing and doubts about min/max for ordinal (see my comment at the top; @FBartos could you maybe chime in here too?). We could also have a chat about it somewhere next week if you want. |
|
The last commit add a mixed type for the mode. It looks like this: I've intentionally removed all other columns in the screenshot. The only thing that doesn't appear to work is that the footnote is missing the superscript letter that indicates which column(s) have more than one mode... @JohnnyDoorn is this also what you had in mind? If yes, I'll add a unit test and investigate the footnote problem a bit more. |
Excellent, thanks @vandenman! |
vandenman
left a comment
There was a problem hiding this comment.
I'm happy with the changes, should @EJWagenmakers get a look at the new behavior?


Fix https://github.com/jasp-stats/INTERNAL-jasp/issues/2749
Fix jasp-stats/jasp-issues#2846
Fix jasp-stats/jasp-issues#3405
The range/min/max still gives weird results for an orderedfactor and I am not sure where the fault lies. In R, when I have an ordered factor I can make the lowest value the max by reverse-coding it, but that does not seem to work in JASP
If I try to recreate this in JASP with facFive, the minimum just stays equal to 1, even if I remove factor level/label/value 1, so not sure if we should maybe just remove this output for ordinals.