philmikejones / rakeR

Tools for easy spatial microsimulation (raking) in R
http://philmikejones.github.io/rakeR/
11 stars 1 forks source link

Fails when input weights already integers #42

Closed virgesmith closed 7 years ago

virgesmith commented 7 years ago

sample function errors because all probabilities are zero. (weights - weights_int) integerise should simply return the input weights in this case. Enclosing this call in an if statement fixes problem.

philmikejones commented 7 years ago

Fixed in https://github.com/philmikejones/rakeR/pull/45