cstatic: call a static method of a .NET class

Description Usage Arguments Examples

Description

This function calls a static method on a .NET type (class).

Usage

1
.cstatic(classname, methodname, ...)

Arguments

classname

The name of the .NET based class to be created. Can either be a fully qualified name like "com.stg.models.DickeyFuller" or "DickeyFuller" if the classname is unique in the VM.

methodname

name of the static method to be called on type

...

a sequence of arguments to the method. The arguments can either be fundamental types, vectors, matrices, or other objects. Fuzzy matching will be applied, allowing imperfectly matched argument types to be converted, as may be needed given R's more basic type system.

Examples

1
2
3
4
5
6
7
## Not run: 

## call MtM static method on MatrixUtils
matrix <- diag(c(1,2,3,4,5,6,7))
newmat <- .cstatic ("com.stg.math.MatrixUtils", "MtM", matrix)

## End(Not run)

rDotNet documentation built on May 2, 2019, 8:19 a.m.