Requires a dataframe with one variable and one value column.
scaleweight(DAT_df, var = c("all", 2), val = 5)a dataframe
the index of the column that should be used as the group variable, OR "all" (note: all non-numeric values will result in the weight being scaled across all objects)
the column that should be scaled (value / sum(values))
the same dataframe, with scaled values in the specifies column