r - Is there anything wrong with using T & F instead of TRUE & FALSE? -
i noticed using t
, f
instead of true
, false
in functions in r gives me same results. of course, t
, f
more concise, yet, see true
, false
being used more often.
i wondering whether there difference between two? there wrong using t
, f
?
t
, f
can re-defined, true
, false
reserved words , cannot re-defined.
> true <- 1l error in true <- 1l : invalid (do_set) left-hand side assignment > false <- 0l error in false <- 0l : invalid (do_set) left-hand side assignment > t <- f # yikes, hard debug!
personally, use t
, f
when use r interactively, never use them in production code or packages.
Comments
Post a Comment