# RowColIndices(8, num_row = 3, num_col = 3)

RowColIndices <- function(number, num_row, num_col) {
     pos_col <- ceiling(number / num_row)
     pos_row <- (number - pos_col * num_row) + num_row
    return(list(row = pos_row, col = pos_col))
}

