There has been discussion on how to get a variable from a string. Indeed, get
works for, say, the data.table
function: get("data.table")
returns data.table
. However,
> get("data.table::data.table")
Error in get("data.table::data.table") :
object 'data.table::data.table' not found
Is there a way to do this that preserves the reference to the package name? I.e., I do NOT want to simply do a split on "::" and get the second half of the string.