Description Usage Arguments Value Examples
Call a method on an object
1 |
obj |
an object |
methodName |
the name of a method of the object |
... |
additional method arguments passed to .External |
an object resulting from the call. May be a CLR object, or a native R object for common types. Can be NULL.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
library(rClr)
testClassName <- "Rclr.TestObject";
(testObj <- clrNew(testClassName))
clrCall(testObj, 'GetFieldIntegerOne')
## derived from unit test for matching the right method (function) to call.
f <- function(...){ paste( 'This called a method with arguments:',
paste(clrCallStatic('Rclr.TestMethodBinding', 'SomeStaticMethod', ...), collapse=', ')) }
f(1:3)
f(3)
f('a')
f('a', 3)
f(3, 'a')
f(list('a', 3))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.