I have data set whose is grouped by a column called SAMPN. I did use the following code to make it numeric,
df1$SAMPN<-data.table::rleid(df1$SAMPN)
but it starts from 1 , can I do something that number start from 100?
I have data set whose is grouped by a column called SAMPN. I did use the following code to make it numeric,
df1$SAMPN<-data.table::rleid(df1$SAMPN)
but it starts from 1 , can I do something that number start from 100?
Try
df1$SAMPN <- data.table::rleid(df1$SAMPN) + 99
Error in gf1$SAMPN : $ operator is invalid for atomic vectors
You are making a typo, your first example says df1$SAMPN
and now you are typing gf1$SAMPN
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.