x = singleton(1)
m1 = marker(x, `1` = "1/2")
m2 = marker(x, `1` = "a/b")
# Attach to x
x1 = setMarkers(x, list(m1, m2))
# Reversing the order of the markers
setMarkers(x, list(m2, m1))
# Alternative syntax, adding one marker at a time
x2 = x |>
addMarker(`1` = "1/2") |>
addMarker(`1` = "a/b")
stopifnot(identical(x1, x2))
Run the code above in your browser using DataLab