set.custom_elemental: Create a custom elemental class and custom elemental objects

Description Usage Arguments Note See Also Examples

Description

For the implementation of a custom model, it is necessary to define a custom elemental class as well as objects for that class. When a custom elemental class is defined, a show method is also defined at the same time by default. To remove the assocaited show method, use remove.show.custom_element( "class_name" ) .

Usage

1
2
3
4
5
set.custom_elemental(class_name, set_show_method = T)

make.custom_elemental(custom_elemental_fx, custom_elemental_name, class)

remove.show.custom_elemental(class_name)

Arguments

class_name

A character string specifying the name of the custom elemental class. The name of the slot in the custom elemental object that contains the elemental function will be the same as the class name.

custom_elemental_fx

A function for the elemental object.

custom_elemental_name

A name for the elemental object.

class

The type of elemental that you want your elemental object to be.

Note

If there are no errors, the set.custom_elemental function will print a message saying that the custom elemental class has been set.

See Also

set.custom_control Setting and making custom elemental classes is necessary to make a custom control class.

make.custom_control As above.

e_show For the show functions

Examples

1
2
3
4
#Make a DOR class from scratch
set.custom_elemental( class_name = "DOR2" )
#use linear_DOR_fx()
linear_DOR = make.custom_elemental( linear_DOR_fx, "linear_DOR", "DOR2" )

Don-Li/CAB_original documentation built on May 6, 2019, 2:53 p.m.