[Rd] Why is srcref of length 6 and not 4 ?
Romain Francois
romain.francois at dbmail.com
Thu Feb 12 13:01:03 CET 2009
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
More information about the R-devel
mailing list