The resource cited by @mara should contain the general information on including data into your package.
It sounds like you're having issues finding files on disk in your package. I currently add a shape file into one of my packages under inst/extdata/. I access it by first sorting out the path using `system.file("extdata","my_file.sf", package="my_package_name"), then supply that path to the function that reads shape files from disk.
no sir, I am making a package and I want to add external data for testing my package using testthat. but I am unable to add those datasets from my disk to my package. and I got this error