Skip to contents

This function takes in a filename in .csv format and returns the model name. The function removes the ".csv" extension, finds the last occurrence of "-" in the filename, and removes all text preceding this last dash (including the dash itself).

Usage

get_model_name(filename)

Arguments

filename

A character string representing the filename.

Value

A character string representing the model name.

Examples

get_model_name("model-1.csv")
#> [1] "1"