-
Notifications
You must be signed in to change notification settings - Fork 150
Closed
Labels
tidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-dayTidyverse Developer Day rstd.io/tidy-dev-day
Description
Since they use -
.
We dismiss complex numbers with a real part, presumably because of the +
, so it would make sense to return FALSE for negative integer, double, and imaginary numbers.
x <- quote((-1))
y <- substitute((X), list(X = -1))
x
#> (-1)
y
#> (-1)
typeof(x[[2]])
#> [1] "language"
typeof(y[[2]])
#> [1] "double"
rlang::is_expression(x) # correct
#> [1] TRUE
rlang::is_expression(y) # incorrect
#> [1] TRUE
Related: rlang::is_syntactic_literal(NA + 1i)
is currently TRUE
, to be a syntactic literal a complex number must have a real part of 0
.
Metadata
Metadata
Assignees
Labels
tidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-dayTidyverse Developer Day rstd.io/tidy-dev-day