ContextFactory | R Documentation |
This class is a factory that provides instances of the Context
class.
get()
Obtain instances of the Context
class.
ContextFactory$get(type)
type
A character string specifying the type of the
Context
to instantiate. Possible values are "regular"
and "progress"
. See the Details section for more information.
When type = "regular"
a Context
instance is created
and returned. When type = "progress"
a
ProgressTrackingContext
instance is provided instead.
An object of type Context
. It throws an error if the
requested context type
is not supported.
clone()
The objects of this class are cloneable with this method.
ContextFactory$clone(deep = FALSE)
deep
Whether to make a deep clone.
Context
, ProgressTrackingContext
,
BackendService
, and Backend
# Create a context factory.
context_factory <- ContextFactory$new()
# Get a regular context instance.
context <- context_factory$get("regular")
# Check the class of the context instance.
class(context)
# Get a progress context instance.
context <- context_factory$get("progress")
class(context)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.