## Locate a directory inside a R package

Sometimes you want to access some file or dir inside a specific package, you can do it in R like this (data dir of the mp package):

toydir = system.file("data", package = "mp")
print(toydir)
setwd(toydir)