db_functions | R Documentation |
These functions are used to register new metrics in the segmetric
database.
sm_list_metrics()
: List all registered metrics.
sm_new_metric()
: Create a new metric entry to be registered in
the database.
sm_reg_metric()
: Register a new metric in the database.
sm_unreg_metric()
: Remove a metric entry from the database.
sm_desc_metric()
: Describe a metric registered from the database.
.db_list() .db_set(key, value) .db_del(key) .db_get(key) sm_list_metrics() sm_new_metric( fn, fn_subset, name = "", optimal = 0, summarizable = TRUE, description = "", reference = "" ) sm_reg_metric(metric_id, entry) sm_unreg_metric(metric_id) sm_desc_metric(metric_id)
fn |
A |
fn_subset |
A |
name |
A |
description |
A |
reference |
A |
metric_id |
A |
entry |
A |
sm_list_metrics()
: Return character
vector with supported metrics.
sm_new_metric()
: Return a metric_entry
object containing the
metric function (fn
), name (name
), description (description
), and
reference (reference
).
sm_reg_metric()
, sm_unreg_metric()
: No return value, called to
(un)register a metric.
sm_desc_metric()
: No return value, called to print a metric description.
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.