You could turn KPI into a factor variable specifying levels in the desired sequence and use that to order the observations.
library(dplyr, warn.conflicts = FALSE)
#> Warning: package 'dplyr' was built under R version 4.0.4
best <- tribble(
~KPI, ~Best_method, ~Value,
"MAE", "Naive", 1091.666667,
"MASE", "Naive", 1.194195,
"MAPE", "addf", 19.158691,
"RMSE", "addf", 1326.316080
)
best %>%
mutate(KPI = factor(KPI, levels = c("MAPE", "RMSE", "MAE", "MASE"))) %>%
arrange(KPI)
#> # A tibble: 4 x 3
#> KPI Best_method Value
#> <fct> <chr> <dbl>
#> 1 MAPE addf 19.2
#> 2 RMSE addf 1326.
#> 3 MAE Naive 1092.
#> 4 MASE Naive 1.19
Created on 2021-03-18 by the reprex package (v1.0.0)