Returns a JSON string defining a function to be used to build a calculated (derived) metric.
cm_function(
func = "col-sum",
metric = "visits",
dimension = NULL,
seg_filter = NULL,
rsid = Sys.getenv("AW_REPORTSUITE_ID"),
company_id = Sys.getenv("AW_COMPANY_ID")
)
Calculated function id. Only Basic single metric functions are able to be used.
The metric to be used in the functional metric calculation. Default is visits
The dimension to be used in the functional metric calculation. Default is NULL
A segment filter to be added to a metric in the formula
Adobe report suite ID (RSID). If an environment variable called
AW_REPORTSUITE_ID
exists in .Renviron
or elsewhere and no rsid
argument
is provided, then the AW_REPORTSUITE_ID
value will be used. Use aw_get_reportsuites()
to get a list of available rsid
values.
Company ID. If an environment variable called AW_COMPANY_ID
exists in .Renviron
or elsewhere and no company_id
argument is provided,
then the AW_COMPANY_ID
value will be used. Use get_me()
to get a list of
available company_id
values.
Returns a full list of calculated metric functions or a specified function that the user can access.