From renaud at mancala.cbio.uct.ac.za  Thu Jul  5 17:34:08 2012
From: renaud at mancala.cbio.uct.ac.za (Renaud Gaujoux)
Date: Thu, 05 Jul 2012 17:34:08 +0200
Subject: [Rd] Extracting srcref for S4 methods
Message-ID: <4FF5B3F0.8040701@cbio.uct.ac.za>

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



[Rd] Extracting srcref for S4 methods
Renaud Gaujoux