Displaying 1 result from an estimated 1 matches for "m_out".
Did you mean:
f_out
2003 May 21
2
moving onto returning a data.frame?
...m some of the packages?) for returning a
data.frame. I'm trying to start my function so that it takes a data.frame as
an argument and returns a data.frame (post-hocus-pocus).
Here's my function so far...
SEXP testfunction3(
SEXP m_in )
{
int *mdims, n, p, i;
double *mm;
SEXP m_out;
SEXP nms;
if( !isMatrix( m_in ) )
{
error("m_in must be a matrix");
}
mdims = INTEGER( GET_DIM( m_in ) );
n = mdims[0];
p = mdims[1];
PROTECT( m_out = NEW_NUMERIC( p ) );
PROTECT( m_in = AS_NUMERIC( m_in ) );
PROTECT( nms = GET_COLNAMES( GET_DIMNAM...