old is supposed to be the object obtained with import.dhs (as it was written in my previous answer).
So, use first import.dhs (and when asked to select the country, choose anyone). Put the result in the variable old and then use the proposed code. The purpose of this code is to replace the default boundary provided by import.dhs by your own boundary file.
The other option is to import and prepare by yourself the data from your DHS and then use as.prevR.
In all cases, don’t forget to verify what is the projection used in your own boundary file.
old
is supposed to be the object obtained withimport.dhs
(as it was written in my previous answer).So, use first
import.dhs
(and when asked to select the country, choose anyone). Put the result in the variableold
and then use the proposed code. The purpose of this code is to replace the default boundary provided byimport.dhs
by your own boundary file.The other option is to import and prepare by yourself the data from your DHS and then use
as.prevR
.In all cases, don’t forget to verify what is the projection used in your own boundary file.