-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Milestone
Description
from #104
calling tf::tfd() with no args I wouldn't throw a message and just return the empty vector like it already does or just throw an error. For non-numeric I would just throw an error since numeric is required for the vectors and the NULL case I would probably also throw an error, but package handle this differently, see for reference:
# blob package
blob::blob()
#> <blob[0]>
blob::blob(NULL)
#> <blob[1]>
#> [1] <NA>
blob::blob(NA)
#> Error: `x` must be a list of raw vectors
# pillar package
pillar::num()
#> Error in pillar::num(): argument "x" is missing, with no default
pillar::num(NULL)
#> Error in pillar::num(NULL): is.numeric(x) is not TRUE
pillar::num("")
#> Error in pillar::num(""): is.numeric(x) is not TRUE
pillar::num(NA)
#> Error in pillar::num(NA): is.numeric(x) is not TRUE
# haven package
haven::labelled()
#> <labelled<double>[0]>
haven::labelled(NULL)
#> Error in `vec_data()`:
#> ! `x` must be a vector, not `NULL`.
haven::labelled(NA)
#> Error in `new_labelled()`:
#> ! `x` must be a numeric or a character vector.
# hms package
hms::hms()
#> hms()
hms::hms(NULL)
#> hms()
hms::hms("")
#> Error: All arguments must be numeric or NA
hms::hms(NA)
#> NA
``
Metadata
Metadata
Assignees
Labels
No labels