Description Details Public fields Methods Examples
R class representing GISDK objects
R class representing GISDK objects
This class simplifies working with GISDK objects over COM from R.
When created, an object of this class contains a COM pointer to a sister
object in Caliper software. In addition to this reference, contained in the
ref
field, there are several other fields and methods to facilitate
object manipulation. Finally, the $
operator has been overloaded for
this class to make code easier to write.
g_class_name
The class name of the underlying GISDK object (e.g. "NLM.Model").
ref
This is a COM pointer and represents the object created in a Caliper program.
info
This is a simple R list that can be used to see the fields and methods of the underlying GISDK object.
new()
Create a new CaliperClass
CaliperClass$new(class_name, ...)
class_name
string
The name of the GISDK class to create.
...
Additional arguments to be supplied to GISDK object creation.
A new CaliperClass
object.
apply_gisdk_method()
Runs a method of the associated GISDK object.
CaliperClass$apply_gisdk_method(method, ...)
method
string
The name of the method to apply.
...
Additional arguments supplied to the GISDK method.
get_gisdk_attribute()
Retrieve an attribute from the GISDK object.
CaliperClass$get_gisdk_attribute(attribute)
attribute
string
The name of the GISDK attribute to get.
The GISDK attribute value.
set_gisdk_attribute()
Set an attribute of the GISDK object.
CaliperClass$set_gisdk_attribute(attribute, value)
attribute
string
The name of the GISDK attribute to get.
value
The value to assign to the attribute.
clone()
The objects of this class are cloneable with this method.
CaliperClass$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# object creation (two options)
obj <- CreateObject("NLM.Model")
obj <- CaliperClass$new("NLM.Model")
# get info about the GISDK object fields and methods
obj$info
# set an attribute/field label of the GISDK object
# (Does not modify the R object in any way)
obj$Label <- "a logit model"
# run one of the GISDK object's methods: Clear()
# (Does not modify the R object in any way)
obj$Clear()
# object methods can be chained
obj$
Clear()$
Read()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.