How can I extract the name of a data.frame
in R as a character?
For example, if I have data.frame
named df
, I want to get "df" as a character object.
a <- data.frame()
deparse(substitute(a))
[1] "a"
This is also how plot
knows what to put on the axes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With