[Rd] getParseData() for imaginary numbers

Duncan Murdoch murdoch.duncan at gmail.com
Thu Sep 19 13:24:24 CEST 2013


On 13-09-18 1:47 PM, Yihui Xie wrote:
> Hi,
>
> The imaginary unit is gone in the 'text' column in the returned data
> frame from getParseData(), e.g. in the example below, perhaps the text
> should be 1i instead of 1:

Yes, I can confirm the bug.  I'll fix it in R-devel now, and in 
R-patched after 3.0.2 is released next week.

Duncan Murdoch

>
>> p=parse(text='1i')
>> getParseData(p)
>    line1 col1 line2 col2 id parent     token terminal text
> 1     1    1     1    2  1      2 NUM_CONST     TRUE    1
> 2     1    1     1    2  2      0      expr    FALSE
>> sessionInfo()
> R version 3.0.1 (2013-05-16)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>   [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>   [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>   [7] LC_PAPER=C                 LC_NAME=C
>   [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> Regards,
> Yihui
> --
> Yihui Xie <xieyihui at gmail.com>
> Web: http://yihui.name
> Department of Statistics, Iowa State University
> 2215 Snedecor Hall, Ames, IA
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list