You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During testing, it can be common to make some trial-and-error.
This can lead to this kind of awkward error message.
library(testthat)
x=iris
class(x$Sepal.Length)
#> [1] "numeric"
typeof(x$Sepal.Length)
#> [1] "double"expss::var_lab(x$Sepal.Length) ="Sepal length"#lets say I mixed the concepts of classes and types
expect_s3_class(x$Sepal.Length, "double")
#> Error: x$Sepal.Length inherits from `labelled/numeric` not `double`.
expect_s3_class(x$Sepal.Length, "labelled/numeric")
#> Error: x$Sepal.Length inherits from `labelled/numeric` not `labelled/numeric`.
Maybe this function can either accept this syntax or specifically handle this situation (for instance by throwing a special message when a class contains /).
The text was updated successfully, but these errors were encountered:
During testing, it can be common to make some trial-and-error.
This can lead to this kind of awkward error message.
Created on 2021-02-07 by the reprex package (v1.0.0)
Maybe this function can either accept this syntax or specifically handle this situation (for instance by throwing a special message when a class contains
/
).The text was updated successfully, but these errors were encountered: