Skip to contents

Loads a designated pretrained model available in the `text2map.pretrained` package. Automatically detects the file format and uses the appropriate loader function.

Usage

load_pretrained(model, location = NULL, quiet = FALSE)

Arguments

model

Character string indicating the model name to load.

location

Optional path to the model file. If NULL, looks in the package's data folder.

quiet

Logical (default `FALSE`) to suppress progress messages.

Value

The loaded model object (e.g., a matrix or list).

Note

The function loads models in the following format priority:

  1. .qs2 - Fastest loading (recommended, ~10x faster than .rda)

  2. .fst - Fast loading, matrix/data.frame only (~3x faster than .rda)

  3. .rda - Standard R format with best compression (~1x)