My the R package depends upon other package (for example “fields”)
What is best practice to ensure that the package is loaded, when my package is loaded.
Should I write cover r program to do this ? Can or should such dependencies distributed with my distribution ?
I will appreciate a detail answer with scrips
Edit:
As per following suggestion I added the following in Discription file.
Depends: R (>= 1.8.0), fields
Still the fields package is not loaded automatically when I load my package.
This is something you specify in your DESCRIPTION file that you ship with your package. You can use either the ‘Depends’ field, or better is to use ‘Imports’ field in combination with a NAMESPACE file. Have a look at the DESCRIPTION and NAMESPACE files from some other packages, or read over the Writing R Extensions manual.