How do I select datatable row using index?

If I have index how do I select datatable row.

table.getItem(table.getIdByIndex(index));