contents returns the value of the parcel contents by evaluating
the expression in the parcel. contents<- attempts to assign
to the expression, which will only work if the expression is appropriate, e.g.
a refset.
Usage
contents(parcel)
contents(parcel) <- value
Arguments
parcel
an object of class 'parcel'
value
a value to assign
Value
The result of evaluating the expression stored in the parcel.
For contents<-, the parcel itself.
contents<- will only work if the expression wrapped in the
parcel can accept assignments.
# NOT RUN {pcl <- wrap(x^2)
x <- 2
contents(pcl)
x <- 3
contents(pcl)
# }# NOT RUN {contents(pcl) <- 4# fails# }# NOT RUN {p2 <- wrap(names(x))
contents(p2) <- "named"x
# }