sm_reg_metric(
metric_id = "Example",
entry = sm_new_metric(
fn = function(m, ...) {
sm_area(sm_ytilde(m)) /
sm_area(sm_ref(m), order = sm_ytilde(m))
},
fn_subset = sm_ytilde,
name = "Metric name example",
description = paste("Values range from A to B.",
"Optimal value is C"),
reference = "Author (Year)"
))
sm_desc_metric("Example")
sm_list_metrics()
Run the code above in your browser using DataLab