search for: sosnam

Displaying 2 results from an estimated 2 matches for "sosnam".

Did you mean: sonam
2017 May 07
2
deparse(substitute(x)) fails in implied call to an S3 print method
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 the name of x in .GlobalEnv?\n', +
2017 May 07
0
deparse(substitute(x)) fails in implied call to an S3 print method
...t that point I don't think the original expression "Xnamed" is available any more.) For your application, you may have to allow users to attach names to the object. I don't know how you're creating those things, but part of the work could save a name as an attribute "SOSname", and then the print method would use that. Duncan Murdoch > > Thanks, > Spencer Graves > > > > sessionInfo() > R version 3.4.0 (2017-04-21) > Platform: x86_64-apple-darwin15.6.0 (64-bit) > Running under: macOS Sierra 10.12.4 > > Matrix p...