jasp-issues icon indicating copy to clipboard operation
jasp-issues copied to clipboard

Variable/column sorting by ascending and descending values

Open chantelanuit opened this issue 1 year ago • 9 comments

Description

Sorting variables by ascending or descending values

Purpose

Data exploration

Use-case

Sorting z scores

Is your feature request related to a problem?

Jasp is not able to sort variable/column values

Is your feature request related to a JASP module?

Descriptives

Describe the solution you would like

Being able to sort numerical variables in ascending or descending order

Describe alternatives that you have considered

doing the sorting with the JASP / R Console

Additional context

When computing z scores, a visual examination of the dataset is interesting. It would be easier if the user could reorder the dataset to examine individual participants according to this sorting (e.g. sorting z scores in ascending or descending order).

I manage to use the R Console to list z scores, e.g.

**

data$Z.VARIABLE[order(data$Z.VARIABLE)]

**

This is however unpractical with a large dataset, where the ability to use the Data Editor would be a better choice.

Maybe I am missing something and this option is already available ?

chantelanuit avatar Nov 14 '23 19:11 chantelanuit

We should totally add this, it will be coming in the near future

JorisGoosen avatar Nov 15 '23 15:11 JorisGoosen

This is great news, thank you

chantelanuit avatar Nov 15 '23 16:11 chantelanuit

@chantelanuit Can you have a look, if this is a duplicate of https://github.com/jasp-stats/jasp-issues/issues/2247

I am not sure if you need this in data view or for tables in result view.

tomtomme avatar Feb 09 '24 08:02 tomtomme

I was interpreting this issue as being about the data-viewer

JorisGoosen avatar Feb 13 '24 09:02 JorisGoosen

This is now in progress for latest 0.19beta via right click on the variable name. The button is already there, but it does nothing yet.

tomtomme avatar Apr 23 '24 10:04 tomtomme

This is now in progress for latest 0.19beta via right click on the variable name. The button is already there, but it does nothing yet.

Ah that button sorts the labels, not the data. I suppose your interpretation is the correct one, im afraid the sorting of the dataviewer is something on the radar for a bit later.

I need to make some changes to the datamodel, so this will have to be post 0.19 Ill remove the button for now though to avoid confusion.

JorisGoosen avatar Apr 23 '24 11:04 JorisGoosen

@JorisGoosen When I click "order by values" in the new beta, nothing happens, neither to values nor for labels. Terminal says: qrc:/components/JASP/Widgets/DataTableView.qml:137: TypeError: Property 'columnOrderByValues' of object DataSetView(0x562a6cc7d130) is not a function

And yes, its name should be "order by labels" then. Could be useful.

tomtomme avatar Apr 23 '24 14:04 tomtomme

Well, Ive just removed it entirely from there, because it isnt as useful as the "reverse values".

Although it is maybe useful, perhaps I can find a better phrasing

JorisGoosen avatar Apr 23 '24 15:04 JorisGoosen

Ive fixed it, put it back in and called it "Order labels by values" because that is what is happening.

JorisGoosen avatar Apr 23 '24 15:04 JorisGoosen