[Rd] Why is srcref of length 6 and not 4 ?

From: Romain Francois <romain.francois_at_dbmail.com>
Date: Thu, 12 Feb 2009 13:01:03 +0100


Hello,

Consider this file (/tmp/test.R) :

<file>
f <- function( x, y = 2 ){

   z <- x + y
   print( z )
}
</file>

I get this in R 2.7.2 :

> p <- parse( "/tmp/test.R" )
> str( attr( p, "srcref" ) )

List of 1
$ :Class 'srcref' atomic [1:4] 1 1 4 1
 .. ..- attr(*, "srcfile")=Class 'srcfile' length 4 <environment>

and this in R-devel :

> p <- parse( "/tmp/test.R" )
> str( attr(p, "srcref") )

List of 1
$ :Class 'srcref' atomic [1:6] 1 1 4 1 1 1  .. ..- attr(*, "srcfile")=Class 'srcfile' <environment: 0x946b944>

What are the two last numbers ?

Romain

-- 
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr

-- 
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 12 Feb 2009 - 11:48:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 12 Feb 2009 - 13:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive