Description Usage Arguments Value Examples
Create a new CLR object
1 |
typename |
type name, possibly namespace and assembly qualified type name, e.g. 'My.Namespace.MyClass,MyAssemblyName'. |
... |
additional method arguments passed to the object constructor via the call to .External |
a CLR object
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
library(rClr)
testClassName <- "Rclr.TestObject";
(testObj <- clrNew(testClassName))
# object with a constructor that has parameters
(testObj <- clrNew(testClassName, as.integer(123)))
clrLoadAssembly("System.Windows.Forms, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089")
f <- clrNew('System.Windows.Forms.Form')
clrSet(f, 'Text', "Hello from '.NET'")
clrCall(f, 'Show')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.