Skip to contents

Take a column of a data frame to use as row names, drop such column and reorder the data frame so row names follow natural order.

Usage

.natural_sort_by_field(df, col)

Arguments

df

A data frame.

col

The column (usually name).

Value

A sorted df