Well, I got a variable that shows numbers like this one: 13015064000992062, and I need to extract the four first numbers and put it in another column. In this case, it will be 1301.
A friend told me that it was using stringr library, but he can't remember the code.
I am working with a data frame. So I need to get a new variable called "canton", that are the four first digits from 'Identificador'