Skip to content
Prev 12334 / 63461 Next

More user-friendly error message needed.

Perhaps one could create a utility function 

	has.element <- function(list, name) name %in% names(list)

and then have $ generate a warning (not an error!) when the named element
does not exist.

This would be helpful in debugging code.  Yesterday I spent quite some time
tracking down an error that turned out to be $ returning a NULL because the
data file I read in had a variable mis-named.   A warning message would have
made everything clear right away.

-G
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}