Determine the weights of products basket based on products probability I need some help to create an R script that will solve the following problem: