[Rd] A bug understanding F relative to FALSE?

John Mount jmount @end|ng |rom w|n-vector@com
Wed Jan 15 15:18:01 CET 2020


>From help(F): TRUE and FALSE are reserved <http://127.0.0.1:39090/help/library/base/help/reserved> words denoting logical constants in the Rlanguage, whereas T and F are global variables whose initial values set to these.

> On Jan 15, 2020, at 6:13 AM, IAGO GINÉ VÁZQUEZ <i.gine using pssjd.org> wrote:
> 
> Hi all,
> 
> Is the next behaviour suitable?
> 
> identical(F,FALSE)
> 
> ## [1] TRUE
> 
> utils::getParseData(parse(text = "c(F,FALSE)", keep.so=rce = TRUE))
> 
> ##    line1 col1 line2 col2 id parent                token terminal  text
> ## 14     1    1     1   10 14      0                 expr    FALSE
> ## 1      1    1     1    1  1      3 SYMBOL_FUNCTION_CALL     TRUE     c
> ## 3      1    1     1    1  3     14                 expr    FALSE
> ## 2      1    2     1    2  2     14                  '('     TRUE     (
> ## 4      1    3     1    3  4      6               SYMBOL     TRUE     F
> ## 6      1    3     1    3  6     14                 expr    FALSE
> ## 5      1    4     1    4  5     14                  ','     TRUE     ,
> ## 9      1    5     1    9  9     10            NUM_CONST     TRUE FALSE
> ## 10     1    5     1    9 10     14                 expr    FALSE
> ## 11     1   10     1   10 11     14                  ')'     TRUE     )
> 
> I would expect that token for F is the same as token for FALSE.
> 
> 
> Thank you!
> 
> Iago
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

---------------
John Mount
http://www.win-vector.com/ <http://www.win-vector.com/> 
Our book: Practical Data Science with R
http://practicaldatascience.com <http://practicaldatascience.com/> 






	[[alternative HTML version deleted]]



More information about the R-devel mailing list