This function searches for model runs in the JPE database using criteria, such as keywords, model run IDs, or an option to view all model runs.

search_model_run(con, keyword = NULL, model_run_id = NULL, view_all = FALSE)

Arguments

con

A database connection object.

keyword

An optional keyword to search within the model run descriptions.

model_run_id

An optional ID to search for a specific model run. If both keyword and model_run_id are NULL, the search will pull the latest model_run.

view_all

A boolean indicating if all model runs should be displayed, ignoring other filters (default is FALSE).

Value

A data frame containing the search results. If view_all is set to TRUE, it returns all model runs. If a keyword or model_run_id is provided, it filters the results accordingly.

Examples

if (FALSE) { # \dontrun{
# Example: Search for the latest model run
latest_model_run <- search_model_run(con)

# Example: Search model runs by keyword
keyword_search_results <- search_model_run(con, keyword = "regression")

# Example: Search for a specific model run by ID
specific_model_run <- search_model_run(con, model_run_id = 5)

# Example: View all model runs
all_model_runs <- search_model_run(con, view_all = TRUE)
} # }