UpdateFactbaseRatioFormula: Creates or updates a metric described by a formula over two...

View source: R/Factbase.R

UpdateFactbaseRatioFormulaR Documentation

Creates or updates a metric described by a formula over two existing metrics. See https://factbase.azurewebsites.net/static/pages/help.html#ratio

Description

Creates or updates a metric described by a formula over two existing metrics. See https://factbase.azurewebsites.net/static/pages/help.html#ratio

Usage

UpdateFactbaseRatioFormula(
  metric_name,
  token,
  numerator,
  denominator,
  definition,
  hyperlink,
  owner,
  as_percentage = F,
  smoothing.window = NULL,
  smoothing.sum = F,
  test = list()
)

Arguments

metric_name

The name that will appear for selection by Factbase users.

token

A Personal Access Token generated in Factbase at Add data > personal access tokens.

numerator

The name of an existing metric. See the documentation reference above.

denominator

The name of an existing metric. See the documentation reference above.

definition

A detailed explanation of the meaning and derivation of the data.

hyperlink

A link to a web page where more can be read about the data. Preferably this is a link into the system that calls this function.

owner

The name (usually an email address) of whoever should be contacted to deal with problems or questions about this data.

as_percentage

If set to TRUE then when shown this formula's values will be multiplied by 100 and given a percent sign.

smoothing.window

(optional) The period over which to smooth the data. One of "day", "week", "month", "quarter" or "year". See the documentation reference above.

smoothing.sum

(optional) TRUE to smooth using a rolling sum. If not specified then a rolling average will be used. See the documentation reference above.

test

(optional) For testing only. Ignore.

Value

The value of 'data' that was passed in, so caller can see data uploaded if this is the last call in R code.


Displayr/flipAPI documentation built on Feb. 28, 2025, 3:48 p.m.