Description Usage Arguments Value Examples
Check whether an object is of a certain type. This function is meant to match the behavior of the 'is' keyword in C#.
1 |
obj |
an object |
type |
the object type to check for. It can be a character, of a object of CLR type System.RuntimeType |
TRUE or FALSE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
library(rClr)
testClassName <- "Rclr.TestObject";
(testObj <- clrNew(testClassName))
clrIs(testObj, testClassName)
clrIs(testObj, 'System.Object')
clrIs(testObj, 'System.Double')
(testObj <- clrNew('Rclr.TestMethodBinding'))
# Test for interface definitions
clrIs(testObj, 'Rclr.ITestMethodBindings')
clrIs(testObj, clrGetType('Rclr.ITestMethodBindings'))
clrIs(testObj, clrGetType('Rclr.TestMethodBinding'))
clrIs(testObj, clrGetType('System.Reflection.Assembly'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.