Create a point estimate output type object of class output_type_item
Source: R/create_output_type_item.R
create_output_type_mean.Rd
Create a representation of a mean
or median
output type as a list object of
class output_type_item
. This can be combined with
additional output_type_item
objects using function create_output_type()
to
create an output_type
object for a given model_task.
This can be combined with other building blocks which can then be written as
or appended to tasks.json
Hub config files.
Usage
create_output_type_mean(
is_required,
value_type,
value_minimum = NULL,
value_maximum = NULL,
schema_version = "latest",
branch = "main"
)
create_output_type_median(
is_required,
value_type,
value_minimum = NULL,
value_maximum = NULL,
schema_version = "latest",
branch = "main"
)
Arguments
- is_required
Logical. Is the output type required?
- value_type
Character string. The data type of the output_type values.
- value_minimum
Numeric. The inclusive minimum of output_type values.
- value_maximum
Numeric. The inclusive maximum of output_type values.
- schema_version
Character string specifying the json schema version to be used for validation. The default value
"latest"
will use the latest version available in the Infectious Disease Modeling Hubs schemas repository. Alternatively, a specific version of a schema (e.g."v0.0.1"
) can be specified.- branch
The branch of the Infectious Disease Modeling Hubs schemas repository from which to fetch schema. Defaults to
"main"
.
Details
For more details consult
the documentation on tasks.json
Hub config files.
Functions
create_output_type_mean()
: Create a list representation of amean
output type.create_output_type_median()
: Create a list representation of amedian
output type.
Examples
create_output_type_mean(
is_required = TRUE,
value_type = "double",
value_minimum = 0L
)
#> $mean
#> $mean$output_type_id
#> $mean$output_type_id$required
#> [1] NA
#>
#> $mean$output_type_id$optional
#> NULL
#>
#>
#> $mean$value
#> $mean$value$type
#> [1] "double"
#>
#> $mean$value$minimum
#> [1] 0
#>
#>
#>
#> attr(,"class")
#> [1] "output_type_item" "list"
#> attr(,"schema_id")
#> [1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.1/tasks-schema.json"
create_output_type_median(
is_required = FALSE,
value_type = "integer"
)
#> $median
#> $median$output_type_id
#> $median$output_type_id$required
#> NULL
#>
#> $median$output_type_id$optional
#> [1] NA
#>
#>
#> $median$value
#> $median$value$type
#> [1] "integer"
#>
#>
#>
#> attr(,"class")
#> [1] "output_type_item" "list"
#> attr(,"schema_id")
#> [1] "https://raw.githubusercontent.com/Infectious-Disease-Modeling-Hubs/schemas/main/v2.0.1/tasks-schema.json"