[R] Name of data.frame as a text string?
Duncan Murdoch
murdoch at stats.uwo.ca
Thu Jul 2 22:32:51 CEST 2009
On 7/2/2009 3:33 PM, Mark Knecht wrote:
> On 7/2/09, Don MacQueen <macq at llnl.gov> wrote:
>> Use
>> deparse(substitute(df))
>>
>> Example from ?deparse:
>>
>> function(x, y) {
>> plot(x, y, xlab=deparse(substitute(x)),
>> ylab=deparse(substitute(y)))
>> }
>>
>> -Don
>>
>
> Now that's interesting... deparsed means ?? de-analyze ?? I'm not
> clear what that's doing for me beyond using only substitute but your
> example and the substitute example both use it so I suppose I
> shouldn't tempt the Fates...
substitute() returns an expression. deparse() turns an expression into
a text string. (So named because parse() turns a text string or strings
into an expression.)
Duncan Murdoch
More information about the R-help
mailing list