View source: R/Utility-Functions.R
MapDimToOptions | R Documentation |
A function that maps dimensions from a dataframe to the options sets
MapDimToOptions(data, items_to_options, allocate)
data |
dataframe - dimension name and dimension UID, along with the quantity |
items_to_options |
dimension item sets dataframe filtered by one of the model sets |
allocate |
If allocate is set to "distriute", mutates a column in the returned df with the weight being multiplied to the value |
If there are no options provided, returns the analytics output, else if there are no dim_uid in the options list, joins the data using crossing or left join, else if the allocation is set to "distriute", then renames them adds a value column and finally performs the renaming of the dimension columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.