# NOT RUN {
test1 <- 1 %#% "One"
# This is equivalent to:
# test <- 1
# description(test) <- "One"
description(test1)
# Results in "One"
# Not that it makes sense, but ...
test2 <- 2 %##% c(
Precedessor = 0,
Successor = 2
)
# This is equivalent to:
# test2 <- 2
# annotation(test2) <- c(
# Precedessor = 0,
# Successor = 2
# )
annotation(test2)
# The following examples are equivalent to
# attr(test2,"annotation")
test2 %@% annotation
test2 %@% "annotation"
test2 %@% another.attribute <- 42
# This is equivalent to attr(test2,"another.attribute") <- 42
attributes(test2)
# }
Run the code above in your browser using DataLab