Local randomness in R
This article is originally published at http://www.questionflow.org/tags/rstats/Prologue Let’s say we have a deterministic (non-random) problem for which one of the solutions involves randomness. One very common example of such problem is a function minimization on certain interval: it can be solved non-randomly (like in most methods of optim()), or randomly (the simplest approach being to generate random set of points on interval and to choose the one with the lowest function value). What is a “clean” way of writing a function to solve the problem?
Thanks for visiting r-craft.org
This article is originally published at http://www.questionflow.org/tags/rstats/
Please visit source website for post related comments.