Sort

Description

This function returns a dataset that contains vd, sorted in ascending order. This function only affects vd. It has no effect on other datasets in the worksheet.

This function works similarly as the menu command Sort Column: Ascending. It contrasts with the Sort Worksheet menu command in that the Sort Worksheet menu command will rearrange the corresponding values in other columns in the worksheet.

Syntax

dataset sort(dataset vd)

Parameter

vd

a dataset, or a column in Origin worksheet you want to sort in ascending order.

Return

Returns a dataset created by sorting vd in ascending order.

Example

newbook;
col(a) = uniform (50, 5);
col(b) = sort(col(a));
col(b)[C]$ = "sorted";

See Also

sort command and sort object.