• 1 Introduction
  • 2 General Conventions
  • 3 Function Interfaces
    • 3.1 User-Facing Functions
    • 3.2 Computational Functions
  • 4 The Model Object
  • 5 Print and Summary Methods
  • 6 Model Predictions
    • 6.1 Input Data
    • 6.2 Return Values
  • 7 Standardized Argument Names
    • 7.1 Dot Usage
    • 7.2 Data Arguments
    • 7.3 Numerical Arguments
    • 7.4 Statistical Quantities
    • 7.5 Tuning Parameters
    • 7.6 Others
  • 8 Parallel Processing
  • 9 Notes

Conventions for R Modeling Packages

Chapter 5 Print and Summary Methods

  • Every class should have a print method that gives a concise description of the object.

    • The print method should invisibly return the original object.

    • The number of significant digits should be an option and should use the global default.

    • Printing the call is discouraged.

  • summary methods are helpful but not required. These should create more verbose descriptions of the object. The print method for the summary object should follow the bullet-pointed remarks above for printing.