sampleValues | R Documentation |
Sample n random values from a parameter or a parameter set uniformly.
Dependent parameters whose requirements are not satisfied are represented by a scalar NA in the output.
sampleValues(par, n, discrete.names = FALSE, trafo = FALSE)
par |
(Param | ParamSet) |
n |
( |
discrete.names |
( |
trafo |
( |
list
. For consistency always a list is returned.
p = makeIntegerParam("x", lower = -10, upper = 10) sampleValues(p, 4) p = makeNumericParam("x", lower = -10, upper = 10) sampleValues(p, 4) p = makeLogicalParam("x") sampleValues(p, 4) ps = makeParamSet( makeNumericParam("u", lower = 1, upper = 10), makeIntegerParam("v", lower = 1, upper = 10), makeDiscreteParam("w", values = 1:2) ) sampleValues(ps, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.