In fact, it’s the defining feature of a package (RStudio and devtools consider any directory containing DESCRIPTION to be a package) 1. However, as time goes by, other aspects of the metadata file will become useful to you, such as revealing what your package does (via the Title and Description) and whom to contact (you!) if there are any problems.Įvery package must have a DESCRIPTION. When you first start writing packages, you’ll mostly use these metadata to record what packages are needed to run your package. The job of the DESCRIPTION file is to store important metadata about your package. The metadata part of the book concludes with Chapter 13, which covers licensing. In Chapter 12, we explain the practical moves necessary to use your dependencies within your package. First, in Chapter 11, we discuss the costs and benefits of dependencies and also provide the relevant technical context around how R finds objects. The next two chapters cover the topic of package dependencies, which is where the importance of the NAMESPACE file will become clear. In this chapter, you’ll learn about the most important fields found in DESCRIPTION. The NAMESPACE file specifies which functions your package makes available for others to use and, optionally, imports functions from other packages. The DESCRIPTION file provides overall metadata about the package, such as the package name and which other packages it depends on. DESCRIPTION and NAMESPACE are two important files that provide metadata about your package.
0 Comments
Leave a Reply. |