# NOT RUN {
co = container("x", 9)
replace(co, 9, 0)
replace(co, "x", 0)
# }
# NOT RUN {
replace(co, "z", 0) # old element ("z") is not in Container
# }
# NOT RUN {
replace(co, "z", 0, add = TRUE) # just add the zero without replacement
d = dict(a = 1, b = "z")
replace(d, 1, 1:5)
replace(d, "z", "a")
# }
# NOT RUN {
replace(d, "a", 2) # old element ("a") is not in Dict
# }
Run the code above in your browser using DataLab