# will produce lints
lint(
  text = "is.numeric(y) || is.integer(y)",
  linters = is_numeric_linter()
)
lint(
  text = 'class(z) %in% c("numeric", "integer")',
  linters = is_numeric_linter()
)
# okay
lint(
  text = "is.numeric(y) || is.factor(y)",
  linters = is_numeric_linter()
)
lint(
  text = 'class(z) %in% c("numeric", "integer", "factor")',
  linters = is_numeric_linter()
)
Run the code above in your browser using DataLab