igraph / rigraph

igraph R package
https://r.igraph.org
532 stars 200 forks source link

assert_character #1364

Closed maelle closed 1 month ago

maelle commented 1 month ago
assert_character <- function(x, name) {
  if (!inherits(x, "character")) {
    cli::cli_abort("{.arg {name}} must be a character, not {.obj_type_friendly {x}}.")
  }
}