I am a beginner and try to perform a bootstrap in R. It would be nice if somebody could help me with the following situation.
I have defined prices and I want to randomly generate quantities (given a constraint, e.g. smaller than 100000) in order to calculate the cost ($cost = price*quantity$).
By randomly generating volumes, I want to obtain a distribution of the total cost (sum of the costs of each bootstrap).
What is the appropriate code in R to do it?