Skip to contents

Check whether a model directory contains a valid saved model

Usage

swrc_model_exists(dir = "./models/swrc", name = "swrc_model")

Arguments

dir

Directory path.

name

Model stem name.

Value

Logical scalar.

Examples

# FALSE for an empty directory: both the weights and the metadata file
# must be present for a model to count as loadable.
swrc_model_exists(dir = tempdir(), name = "no_such_model")
#> [1] FALSE