Learn R Programming

sm (version 2.0-14)

sm.options: Set or return options of sm library

Description

Provides a means to control the behaviour of the sm library such as the colour of the plotted lines, the size of the grid in 2-D estimation, the set of evaluations points, and many others.

Usage

sm.options(...)

Arguments

...
a list may be given as the only argument, or a vector of character strings given as the only argument, or any number of arguments may be in the name=value form , or no argument at all may be given. See the Value and Side Effects sections for

Value

  • a list with the updated values of the parameters; if the argument list is not empty, the returned list is invisible.

Details

The parameter values set via a call to this function will remain in effect for the rest of the session, affecting the subsequent behaviour of the other functions of the sm library for which the given parameters are relevant.

This offers the possibility of customizing the functioning of the sm library, for instance by insertions of approriate calls to sm.options in a load hook for package sm.

Examples

Run this code
sm.options(poly.index = 0)
# subsequent regression estimations will be performed using local means
# instead of local regression
#
sm.options(describe = FALSE)  
# turns off typing documentation files of data loaded by `sm.script'
# (works from command-line)
# 
setHook(packageEvent("sm", "onLoad"),
        function(...) sm.options(describe = FALSE))) 
# this line can be inserted in `.Rprofile' for permanent customisation

Run the code above in your browser using DataLab