Reputation: 840
I'm trying to read the name of an object of type list. i.e.
myList <- list("foo","foo1")
The way I normally read object names is:
deparse(substitute(myList))
however in case of this list it returns:
"list(\"foo\", \"foo1\")"
The result I want is "myList". Can anyone help?
Upvotes: 1
Views: 59
Reputation: 840
The way how I'd read a function actually returns the desired result unlikely I mentioned first.
as.character(substitute(myList))
Upvotes: 3