If the resources argument contains invalid resources, then these are ignored but a warning is issued. If non of the resources is valid, then an error is produced.

valid_resources_arg(object, resources = NULL, return.logical = FALSE)

Arguments

object

A MizerSim or MizerParams object from which the resources should be selected.

resources

The resources to be selected. Optional. By default all resources are selected. A vector of resource names, or a numeric vector with the resource indices, or a logical vector indicating for each resource whether it is to be selected (TRUE) or not.

return.logical

Whether the return value should be a logical vector. Default FALSE.

Value

A vector of resource names, in the same order as specified in the 'resources' argument. If 'return.logical = TRUE' then a logical vector is returned instead, with length equal to the number of resources, with TRUE entry for each selected resource.