matrixCOMHandler | R Documentation |
This is a function that generates suitable functions for making an S matrix accessible as a COM object. It returns a list of functions that have access to the original matrix object and which allow client applications to access the values, dimensions, etc. of the matrix. This function is used when R tries to create a COM object when convering a matrix to a COM return value or argument to a COM method.
matrixCOMHandler(m)
m |
the original S matrix that is to be expose to the COM world |
This is called by the method for the createCOMObject
function for a matrix object.
The resulting list of functions is then used
to create a COMSIDispatchObject
object
which is passed to the C/C++ code to implement
the COM object.
A list of functions which act as methods for the COM representation of the matrix.
values |
return the elements of the matrix as a single array,
using |
dim |
return an array of length 2 giving the number of rows and columns of the matrix. |
column |
return a particular column. This can be called with a scalar or an array identifying the column or columns. These identifiers may be numbers or strings. If more than one column is accessed, the result will be another COM matrix object. |
row |
same as |
element |
access a particular element of the matrix, (i,j) |
nnrow |
the number of rows in the matrix |
ncol |
the number of columns in the matrix. |
rownames |
the array of row names, or NULL |
colnames |
the array of column names, or NULL |
.properties |
empty character vector. |
createCOMObject
COMSIDispatchObject
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.