R packages represent another level of abstraction, where the interface presented to the user is a set of user-facing functions. This collection of functions can be assembled into an R package. Once one has developed many functions, it becomes natural to group them in to collections of functions that are aimed at achieving an overall goal. They only need to understand the inputs and outputs. The use of functions simplifies things for the user because the user no longer needs to be knowledgeable of the details of the underlying code. In the previous chapter, we discussed how writing functions abstracts the behavior of a set of R expressions by providing a defined interface, with inputs (i.e. function arguments) and outputs (i.e. return values). It is the natural extension of writing functions that each do a specific thing well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |