test_if_equal function

Test if all character vectors in a string are equal

Test if all character vectors in a string are equal

Compares all elements of a vector of numbers or character strings and returns TRUE if they are all the same, FALSE otherwise.

test_if_equal(test_vector)

Arguments

  • test_vector: vector of strings or numbers to be tested.

Returns

TRUE if all elements of the vector are the same; FALSE otherwise.

Examples

test_if_equal(c(1,3,1)) test_if_equal(c("a","a","a")) test_if_equal(c("a","b","a"))

Author(s)

Eike Luedeling

  • Maintainer: Eike Luedeling
  • License: GPL-3
  • Last published: 2024-11-14

Useful links