get_duplicate_param_ids {beastier}R Documentation

Find duplicate RealParameter IDs

Description

Find duplicate RealParameter IDs

Usage

get_duplicate_param_ids(text)

Arguments

text

the XML as text

Value

a vector of duplicate IDs, will be empty if all IDs are unique

Author(s)

Richèl J.C. Bilderbeek

See Also

to see if all IDs are unique, use has_unique_ids

Examples

  line_1 <- "<parameter id=\"RealParameter.1\" ...</parameter>"
  line_2 <- "<parameter id=\"RealParameter.2\" ...</parameter>"
  testit::assert(
    length(get_duplicate_param_ids(c(line_1, line_2))) == 0)
  testit::assert(
    get_duplicate_param_ids(
    c(line_1, line_1)) == c("RealParameter.1")
  )
  testit::assert(
    get_duplicate_param_ids(
    c(line_2, line_2)) == c("RealParameter.2")
  )

[Package beastier version 2.4.8 Index]