Skip to content
Prev 206611 / 398503 Next

Error: object of type 'closure' is not subsettable

On 01/17/2010 09:00 PM, Rolf Turner wrote:
rep is an internal generic, so the  dispatch happens internally (in the 
c code). Here is the relevant C code fragment :

SEXP attribute_hidden do_rep(SEXP call, SEXP op, SEXP args, SEXP rho)
{
     SEXP ans, x, ap, times = R_NilValue /* -Wall */, ind;
     int i, lx, len = NA_INTEGER, each = 1, nt, nprotect = 4;

     if (DispatchOrEval(call, op, "rep", args, rho, &ans, 0, 0))
	return(ans);

     ...

}

Romain