I am trying to extract the name of the list I am passing to a function as a string. The string extracted must be stored within the same function (so I can use it during the same call).
Example:
my_function <- function(obj, arg = NULL) {
# obj is a list object that I pass to my_function()
obj_string <- ... # obj_string is the name of the list I have just passed to my_function
}
so, if I write my_function(list_name), obj_string must store "list_name".
I tried with deparse(substitute(obj)) or deparse(substitute(Transform)) but they don't work.
I have also tried {{obj}} but it won't work either.