# 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)
Run the code above in your browser using DataLab