sharedObjectProperties | R Documentation |
Get/Set the properties of a shared object.
sharedObjectProperties(x, ..., literal = TRUE)
## S4 method for signature 'ANY'
sharedObjectProperties(x, ..., literal = TRUE)
## S4 method for signature 'list'
sharedObjectProperties(x, ..., literal = TRUE)
getCopyOnWrite(x)
getSharedSubset(x)
getSharedCopy(x)
setCopyOnWrite(x, value)
setSharedSubset(x, value)
setSharedCopy(x, value)
x |
A shared object |
... |
The name of the property(s), it can be either symbols or characters. if the argument is missing, it means getting all properties. See examples. |
literal |
Whether the parameters in |
value |
The value of the property |
For numeric objects, the properties are dataId
, length
,
totalSize
, dataType
, ownData
, copyOnWrite
, sharedSubset
,
sharedCopy
.
For character objects, the properties are
length
, unitSize
,totalSize
,dataType
,uniqueChar
,copyOnWrite
.
Note that only copyOnWrite
, sharedSubset
and sharedCopy
are mutable.
The other attributes are read-only.
get: The property(s) of a shared object
set: The old property(s)
## For numeric objects
x1 <- share(1:10)
## Get attributes
sharedObjectProperties(x1)
sharedObjectProperties(x1, copyOnWrite)
sharedObjectProperties(x1, "copyOnWrite")
props <- "copyOnWrite"
sharedObjectProperties(x1, props, literal = FALSE)
getCopyOnWrite(x1)
## Set attributes
sharedObjectProperties(x1, copyOnWrite = FALSE)
setCopyOnWrite(x1, FALSE)
## For character objects
x2 <- share(letters)
sharedObjectProperties(x2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.