ids2rownum: Convert Vector of ids into Vector of Row Numbers
Description
ids2rownum takes a vector of ids and converts it to the right
row number in the dataset; ids should be unique in the dataset
that is, don't pass the function panel data with multiple same ids