[R] Functions starting with underscores

Joseph Wang joe at gnacademy.org
Mon Jun 5 07:35:57 CEST 2006


I'm having problems with functions starting with underscores

'_foo' <- function(x) {1}

seems to work

but I can't assign an attribute to this function

attr('_foo', 'bar') <- 'pow'

Any way of doing this?  This is for a C++ -> R wrapping system so I'd like to 
keep the C++ names which start with underscores.

(please cc: responses to me personally)



More information about the R-help mailing list