| crew_class_controller_sequential | R Documentation |
R6 class for sequential controllers.
See crew_controller_sequential().
crew::crew_class_controller -> crew_class_controller_sequential
crew::crew_class_controller$collect()crew::crew_class_controller$crashes()crew::crew_class_controller$empty()crew::crew_class_controller$initialize()crew::crew_class_controller$map()crew::crew_class_controller$nonempty()crew::crew_class_controller$pids()crew::crew_class_controller$pop()crew::crew_class_controller$promise()crew::crew_class_controller$resolved()crew::crew_class_controller$saturated()crew::crew_class_controller$started()crew::crew_class_controller$summary()crew::crew_class_controller$terminate()crew::crew_class_controller$unpopped()crew::crew_class_controller$unresolved()crew::crew_class_controller$validate()crew::crew_class_controller$walk()start()Start the controller if it is not already started.
crew_class_controller_sequential$start(controllers = NULL)
controllersNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
For the sequential controller, there is nothing to do except register the client as started.
NULL (invisibly).
launch()Does nothing for the sequential controller.
crew_class_controller_sequential$launch(n = 1L, controllers = NULL)
nNumber of workers to launch.
controllersNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
NULL (invisibly).
scale()Does nothing for the sequential controller.
crew_class_controller_sequential$scale(throttle = TRUE, controllers = NULL)
throttleNot applicable to the sequential controller.
controllersNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
Invisibly returns FALSE.
autoscale()Not applicable to the sequential controller.
crew_class_controller_sequential$autoscale(controllers = NULL)
controllersNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
NULL (invisibly).
descale()Not applicable to the sequential controller.
crew_class_controller_sequential$descale(controllers = NULL)
controllersNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
NULL (invisibly).
push()Push a task to the head of the task list.
crew_class_controller_sequential$push( command, data = list(), globals = list(), substitute = TRUE, seed = NULL, algorithm = NULL, packages = character(0), library = NULL, seconds_timeout = NULL, scale = TRUE, throttle = TRUE, name = NULL, save_command = NULL, controller = NULL )
commandLanguage object with R code to run.
dataNamed list of local data objects in the evaluation environment.
globalsNamed list of objects to temporarily assign to the
global environment for the task.
This list should
include any functions you previously defined in the global
environment which are required to run tasks.
See the reset_globals argument
of crew_controller_local().
substituteLogical of length 1, whether to call
base::substitute() on the supplied value of the
command argument. If TRUE (default) then command is quoted
literally as you write it, e.g.
push(command = your_function_call()). If FALSE, then crew
assumes command is a language object and you are passing its
value, e.g. push(command = quote(your_function_call())).
substitute = TRUE is appropriate for interactive use,
whereas substitute = FALSE is meant for automated R programs
that invoke crew controllers.
seedInteger of length 1 with the pseudo-random number generator
seed to set for the evaluation of the task. Passed to the
seed argument of set.seed() if not NULL.
If algorithm and seed are both NULL for the sequential
controller, then the random number generator defaults to the
current RNG of the local R session where the sequential
controller lives.
algorithmInteger of length 1 with the pseudo-random number
generator algorithm to set for the evaluation of the task.
Passed to the kind argument of RNGkind() if not NULL.
If algorithm and seed are both NULL for the sequential
controller, then the random number generator defaults to the
current RNG of the local R session where the sequential
controller lives.
packagesCharacter vector of packages to load for the task.
libraryLibrary path to load the packages. See the lib.loc
argument of require().
seconds_timeoutNot used in the sequential controller..
scaleNot used in the sequential controller.
throttleNot used in the sequential controller.
nameCharacter string, name of the task. If NULL, then
a random name is generated automatically.
The name of the task must not conflict with the name of another
task pushed to the controller. Any previous task with the same name
must first be popped before a new task with that name can be pushed.
save_commandDeprecated on 2025-01-22 (crew version
0.10.2.9004) and no longer used.
controllerNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
Invisibly returns a mirai-like list where the data
element is the result of the task.
wait()Not applicable to the sequential controller.
crew_class_controller_sequential$wait( mode = "all", seconds_interval = NULL, seconds_timeout = Inf, scale = TRUE, throttle = TRUE, controllers = NULL )
modeNot applicable to the sequential controller.
seconds_intervalNot applicable to the sequential controller.
seconds_timeoutNot applicable to the sequential controller.
scaleNot applicable to the sequential controller.
throttleNot applicable to the sequential controller.
controllersNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
Always returns TRUE (invisibly)
for the sequential controller.
push_backlog()Not applicable to the sequential controller.
crew_class_controller_sequential$push_backlog(name, controller = NULL)
nameCharacter of length 1 with the task name to push to the backlog.
controllerNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
NULL (invisibly).
pop_backlog()Not applicable to the sequential controller.
crew_class_controller_sequential$pop_backlog(controllers = NULL)
controllersNot used. Included to ensure the signature is compatible with the analogous method of controller groups.
Always character(0L) for the sequential controller.
cancel()Not applicable to the sequential controller.
crew_class_controller_sequential$cancel(names = character(0L), all = FALSE)
namesNot applicable to the sequential controller.
allNot applicable to the sequential controller.
Other sequential controllers:
crew_controller_sequential()
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
controller <- crew_controller_sequential()
controller$push(name = "task", command = sqrt(4))
controller$pop()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.