[Rd] R echoes integer literals incorrectly, under certain conditions (PR#13204)

Duncan Murdoch murdoch at stats.uwo.ca
Sat Oct 25 17:20:53 CEST 2008


On 25/10/2008 10:45 AM, milbo at sonic.net wrote:
> Full_Name: Stephen Milborrow
> Version: R 2.8.0
> OS: Windows XP
> Submission from: (NULL) (81.159.65.46)
> 
> 
> Under certain conditions, R 2.8.0 incorrectly echoes integer literals without
> the "L" suffix.  R 2.7.2 is ok.
> 
> To reproduce, create two files as follows:
> a.R containing: source("b.R", echo=TRUE)
> b.R containing: x <- 1L
> 
> Now execute: Rterm --vanilla --silent <a.R
> This echoes:    x <- 1
> It should echo: x <- 1L
> 
> This behaviour does not occur if you source("b.R") directly from the R command
> prompt, or if you use R 2.7.2.

It works fine for me.  Could you try changing b.R to contain a comment, e.g.

x <- # a comment
      1L

and let us know what you see in the two cases?  I'm guessing you won't 
see the comment being echoed when you source a.R because for some reason 
your system is deparsing instead of going back to the source to read it, 
but I don't know what'll happen with b.R.

Duncan Murdoch
> 
>> sessionInfo()
> R version 2.8.0 (2008-10-20) 
> i386-pc-mingw32 
> 
> locale:
> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
> States.1252;LC_MONETARY=English_United
> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base 
> 
> www.milbo.users.sonic.net
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list