Re: [Rd] deparse(substitute(x)) fails in implied call to an S3 print method

2017-05-07 Thread Spencer Graves
On 2017-05-07 3:46 PM, Duncan Murdoch wrote: On 07/05/2017 3:56 PM, Spencer Graves wrote: In an implied call to an S3 print method, deparse(substitute(x)) returns "x", regardless of the name of object in .GlobalEnv, as indicated in the following: > Xnamed <- 1 > class(Xnamed) <- 'name.x'

Re: [Rd] deparse(substitute(x)) fails in implied call to an S3 print method

2017-05-07 Thread Duncan Murdoch
On 07/05/2017 3:56 PM, Spencer Graves wrote: In an implied call to an S3 print method, deparse(substitute(x)) returns "x", regardless of the name of object in .GlobalEnv, as indicated in the following: > Xnamed <- 1 > class(Xnamed) <- 'name.x' > print.name.x <- function(x, ...){ + namex

[Rd] deparse(substitute(x)) fails in implied call to an S3 print method

2017-05-07 Thread Spencer Graves
In an implied call to an S3 print method, deparse(substitute(x)) returns "x", regardless of the name of object in .GlobalEnv, as indicated in the following: > Xnamed <- 1 > class(Xnamed) <- 'name.x' > print.name.x <- function(x, ...){ + namex <- deparse(substitute(x)) + cat('How can I get