is.shared {SharedObject} | R Documentation |
Test whether the object is a shared object
is.shared(x, ..., depth = 0, showAttributes = FALSE) ## S4 method for signature 'ANY' is.shared(x, ..., depth = 0, showAttributes = FALSE)
x |
An R object |
... |
For generalization purpose only |
depth |
Whether to recursively check the element of |
showAttributes |
Whether to check the attributes of |
When depth=0
, the is.shared
function return a single logical value indicating
whether x
contains any shared objects. When depth>0
and x
is a
container(e.g. list
), the function will recursively check each element of x
and
return a list with each elements corresponding to the elements in x
.
The depth of the checking procedure is determined by the depth
parameter.
if showAttributes = TRUE
, the attributes of the object will also be checked. The
result can be find in sharedAttributes
attribute. Note that showAttributes
has
no effect on an S4 object for the attributes of an S4 object are used to store the
slots and should not be treated as the attributes of an object.
a single logical value of a list.
x1 <- share(1:10) is.shared(x1) x2 <- share(list(a=list(b=1, d=2))) is.shared(x2, depth=0) is.shared(x2, depth=1) is.shared(x2, depth=2)