Hi Everyone I have a function f which does something using a function g. Function f is in a library and g has a default stub in the library but will be mainly overloaded in a later R script. For example:
########## In a compiled package 'P' ################# g <- function() { cat("Original function g"); } f <- function( newGsource=NULL ) { if( is.null(newGsource) == FALSE ) { source( newGsource ); # load new function g } g(); return(1); } ##################################################### If I call f() then I get "Original function g". But I want to overload g so I do the following in the file newg.R: ############### CONTENTS of newg.R ########################## g <- function() { cat("New function g in newg.R"); } ################ END CONTENTS ############################### and call f( newGsource="newg.R" ) but I still get "Original function g". Any suggestions? Tom -- --- Tom McCallum WWW: http://www.tom-mccallum.com Tel: 0131-4783393 Mobile: 07866-470257 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel