matrixCOMHandler {RDCOMServer}R Documentation

COM dispatcher for an S matrix

Description

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.

Usage

matrixCOMHandler(m)

Arguments

m the original S matrix that is to be expose to the COM world

Details

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.

Value

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 as.vector
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 column above, but for rows.
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.

See Also

createCOMObject COMSIDispatchObject

Examples



[Package RDCOMServer version 0.6-1 Index]