Optional: Optional types

OptionalR Documentation

Optional types

Description

This function declares an optional type, a union of the named class (which must already be defined) and NULL. It is meant for use in packages.

Usage

Optional(className)

Arguments

className

A string naming an existing (S4) class.

Value

The name of the union class (invisibly), which will be the original class name with "Optional" prepended to it.

Author(s)

Jon Clayden

References

Please cite the following reference when using TractoR in your work:

J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v044.i08")}.

See Also

setClassUnion


tractor.base documentation built on Nov. 5, 2025, 6:18 p.m.