[Rd] Extracting srcref for S4 methods
Hi, on R version 2.15.1 (2012-06-22) (Platform: i686-pc-linux-gnu (32-bit)) sourced functions have srcref attached as an attribute. Are such data also available for S4 generics and methods? How? (See sample code below) Thank you. Bests, Renaud f <- textConnection( " f <- function(){} setGeneric('myfun', function(x, ...) standardGeneric('myfun')) setMethod('myfun', 'numeric', function(x, ...){ 'myfun,numeric' }) ") source(f, keep.source=TRUE) # there are srcref data for functions str(f) # no srcref data str(myfun) str(selectMethod(myfun, 'numeric')) -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Extracting srcref for S4 methods
Responding to my own question here. It appears I had overlooked the results from my sample script, as they in fact do contain srcref data, but simply do not show them up in str(): f <- textConnection( " f <- function(){} setGeneric('myfun', function(x, ...) standardGeneric('myfun')) setMethod('myfun', 'numeric', function(x, ...){ 'myfun,numeric' }) ") source(f, keep.source=TRUE) # there are srcref data for functions str(f) # no srcref data str(attr(myfun, 'srcref')) str(attr(selectMethod(myfun, 'numeric'), 'srcref')) So no worries. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Feature request: workaround for 'Sys.timezone()' issue for German MS-Windows
Dear list, I know this is *not* R's but Windows fault, at least for the German version. But: `Sys.timezone()' will return with an invalid time zone. I just wondered if there's a chance to implement an alternative, "OS-independent" way for querying the time zone corresponding to the country where a specific R session was launched. I've written a post on SO where I had a go at it, but it involves way to many steps: http://stackoverflow.com/questions/11347854/retrieve-time-zone-based-on-locale-country-information-in-an-os-independent-wa It'd be really great if someone could consider addressing this. Thank you very much, Janko Thyson __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] typo in src/library/base/man/connections.Rd
327c327 < For write-mode connections, \code{compress} specifies now hard the --- > For write-mode connections, \code{compress} specifies how hard the __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] typo in src/library/base/man/connections.Rd
On 05/07/2012 12:40 PM, Shotwell, Matthew Stephen wrote: 327c327 < For write-mode connections, \code{compress} specifies now hard the --- > For write-mode connections, \code{compress} specifies how hard the __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel Thanks, will fix. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel