Feature request: sort by RowIndex

Dear KNIMErs,

Small (but crucial?) feature request:

Please consider to offer the option of sorting by "Rowindex" without having to create one explicitly. The current sorter only offers to sort by "RowKey" (called RowID everywhere else), and in the current string-based row naming scheme without leading zeroes this leads to the "order" of Row1, Row10, Row1000, Row2, ...

#-(

Thanks for considering it!

Cheers
E

2 Likes

How should it work when there are different naming schemes of the row keys? (Like: versicolor_21, Versicolor_3, versicolor.21, ...) (Sort by row index would be no change in case of ascending (as row index is always the index from the first row) or the reverse in case of descending.)

Gabor,

Indeed special naming makes sense sometimes, but all these (frequent) times that I just need to put a table back into its original order I'd love to have the RowIndex, gladly in addition to the RowKey/RowId.

-E

2 Likes

Hi E.

same here, I did add a vote to our system. And will try to push this into a release.

(Because I totally know what you are talking about. This is why I made the Counter Generation node... )

Best, Iris 

1 Like

Yay, thanks! :)

E

@Iris Any progress on this?

It seems - to me at least - re-sorting by original RowIndex is a common problem.

For those stumbling on this looking fo an solution:

  • use RowId node to put the RowId into a column
  • use StringManipulation node to extract integers
  • use StringToNumber node to transform result into type integer
  • … than use Sorter node for sorting on newly created column

KNIME_project2.knwf (10.3 KB)

2 Likes

Hi there @petermeissner,

not for now. I have added +1 to it (internal reference: AP-3276).

Br,
Ivan

1 Like

Hi @ipazin,

would give this also a +1 :slight_smile:
Thanks!

also +1

This should be easy theoretically as all that is needed would be the proper type of sorting (alphanumerical).

1 Like

Hello!
+2 done!
Ivan

1 Like

Hey all,

good things come to those who wait: on behalf of our developers (praise goes to @hotzm !), I’m happy to announce that a alphanumeric sort order has been implemented in the sorter node, the table view, and most other places where sorting is done. Of course, backward compatibility is not broken, so e.g. the GroupBy/Pivot Nodes still sort strings the old fashioned way. Also, this was already available in 4.7.0 in case you didn’t notice :slight_smile: Check it out in the new KNIME Version 4.7.1!

Kind regards,
Lukas

7 Likes