# NOT RUN {
## Creating 3 subgroups of milk:
# }
# NOT RUN {
ctg<-unique(milk$description)
# }
# NOT RUN {
categories<-c(ctg[1],ctg[2],ctg[3])
# }
# NOT RUN {
milk1<-dplyr::filter(milk, milk$description==categories[1])
# }
# NOT RUN {
milk2<-dplyr::filter(milk, milk$description==categories[2])
# }
# NOT RUN {
milk3<-dplyr::filter(milk, milk$description==categories[3])
# }
# NOT RUN {
## Sample use of this function:
# }
# NOT RUN {
sales_groups(datasets=list(milk1,milk2,milk3),start="2019-04",end="2019-04",shares=TRUE)
# }
# NOT RUN {
sales_groups(datasets=list(milk1,milk2,milk3),start="2019-04",end="2019-07",
barplot=TRUE, names=categories)
# }
Run the code above in your browser using DataLab