cutRange: Convert Numeric to Factor based on supplied ranges

Description Usage Arguments Examples

View source: R/BrandDensity2.R

Description

cutRanges divides the range of *value_col* and codes the values according to which interval they fall in based on the provided a new column value_cat to the returned dataframe

Usage

1
cutRange(df, value_col, cut_range, adapt = T)

Arguments

df

a data frame

value_col

a name of numeric column to be converted

cut_range

character vector that is simialar to the output of *cut* function. Each element represents a range closed on the right

adapt

logical, if TRUE add o zero range to put zero values into it's own range

Examples

1
2
3
4
## Not run: 
df2<-cutRange(df,"customer_value",df_ranges,F)

## End(Not run)

kostya75/kmGeoHelper documentation built on July 1, 2020, 4:56 a.m.