Modify the properties of a job
job_modify(jobname = NULL, newname = NULL, description = NULL, owner = NULL, status = NULL, priority = NULL, path = NULL, tags = NULL, url = NULL, delete = FALSE)
jobname | the current name for the job |
---|---|
newname | the new name |
description | the new description |
owner | nick name for the new owner |
status | the new status |
priority | the new priority |
path | the new path to the job folder |
tags | string with tags (uses | as separator) |
url | string specifying url |
delete | should this job be deleted (default = FALSE) |
The role of the job_modify()
function is to change one or more
parameters of an existing workbch job. It can be called in two ways, interactively
or programmatically. To call the function interactively, R must be in interactive
mode and the function should be called specifying either the jobname
argument
only, or no arguments specified. If no jobname
is specified the
job_modify()
function will attempt to guess the
current job by looking at any open RStudio projects. If no project is open
or the RStudio API is not available it attempts to guess by looking at the
working directory
When called interactiely, the user
will be presented with a sequence of prompts, asking them to specify each
of the parameters that define a job (e.g., a character string for descripton
,
a number for priority
). When used interactively, you do not need to include
quote marks when entering a string: job_modify()
will coerce the input to
the appropriate format, and then append the created job to the job file.
When called programmatically, the user must specify the arguments in the
call to job_modify()
. Onlt the jobname
argument is mandatory.
To rename an existing job the newname
argument should be specified.
To modify description
, owner
, status
, priority
,
path
, tags
or urls
the relevant argument shoul be
specified.
The status
of a job should be "active"
, "inactive"
,
"complete"
, "abandoned"
or "masked"
. The priority
for
a job should be a positive integer: the intent is that priority 1 is the highest
priority, followed by priority 2, and so one. The tags
for a job can be
specified as a single string, using |
as a separator character (e.g.,
tags = "research | statistics"
would create two tags for the job).
The path
should specify the location of a folder containing the project
files. The format for urls
is the same as for tags. For example to
specify a GitHub link one might write urls = "github \
https://github.com/djnavarro/workbch"
. Multiple URLs can be specified by
extending this syntax using |
as the separator. For example:
urls = "github \ https://github.com/djnavarro/workbch | docs |
https://djnavarro.github.io/workbch"
.
Setting delete = TRUE
will delete the job.