Adding a Resource Converter

The first thing to do is to ensure that an appropriate converter between the relevant types does not already exist in any of the widget sets chapters. To do this, we load each of the widget sets (easily done with invisible(lapply(.StandardWidgetSets,load))). Now, we use the function lookupConverter() to check for the existence of any converter from a particular type (and optionally to the specific type). For example, suppose we are interested in a converter from the resource type "ShellHorizPos" to the type "Long". The first command below tests to see if such a converter exists. (You can't tell on which chapter!)
> lookupConverter("ShellHorizPos","Long")
[1] T
> lookupConverter("ShellHorizPos")
[1] "SObject" "Long"   
The second command gives a list of the destination types for which a converter from "ShellHorizPos" exists.
Duncan Temple Lang<duncan@stat.Berkeley.EDU>
Last modified: Sat Apr 5 08:41:10 PST 1997