Skip to content
Prev 200631 / 398503 Next

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

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: