Suppose we have a vector of numbers that has 6 elements (e.g. 200001). We know from the codebook that the first 4 positions is year and the following 2 positions is country id. To extract information from this vector accordingly, we use command "substr."
longvector <- 200001
country <- substr(longvector, start=5, stop=6)
2 hours ago