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

From: <murdoch_at_stats.uwo.ca>
Date: Sat, 25 Oct 2008 17:25:12 +0200 (CEST)


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


R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 25 Oct 2008 - 15:33:08 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 Sat 25 Oct 2008 - 20:30:27 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