Skip to content

getting the name of a single object in R for debugging output

3 messages · Andrew, Henrique Dallazuanna

#
Try this:

debugPrint <- function(x, ...){
	print(sprintf("%s: %d", deparse(substitute(x)), x), ...)
}
On Wed, Nov 18, 2009 at 8:35 AM, Andrew <nodecorum at yahoo.com> wrote: