Get the name of a data.frame


I would like to get the name of a data.frame in R.

For example:

If I have the data.frame Users and I pass it as a parameter in a function, I would like to obtain "Users" and not the data.


name (Users) # Invented function but that symbolizes what I want it to do.



As much as I look for I can not find, if it exists, the function in R that does it. With rownames () I get those in the row, with colnames () or names () those in the columns but not the name of the data.frame.

asked by adamista 20.04.2017 в 13:15

1 answer


You can use substitute

prueba <-0
substitute(prueba) ## Retorna "prueba"
answered by 20.04.2017 / 13:48