[R] Returning name of dataframe?
thomas.parr at maine.edu
Thu Jun 20 02:16:02 CEST 2013
I am writing a function and I would like to return the name of a data frame
in a paste call, but I can't figure out how to just get the name. The names
of the data frames used, won't be the same each time. I have to be
overlooking the obvious.
print(paste("the sum of", x, "and", y,"is", sep=" "))
#That function should return:
>"the sum of a and b is:"
>.and some data.
Not surprisingly, it returns all the data in the data frame.
More information about the R-help