Utility functions to build a set of individuals. The function
gen
expects an R expression and a number n in order to create a list
of n individuals based on the given expression. Functions genBin
,
genPerm
and genReal
are shortcuts for initializing populations
of binary strings, permutations or real-valued vectors respectively.
gen(expr, n) genBin(n, n.dim) genPerm(n, n.dim) genReal(n, n.dim, lower, upper)
expr | [R expression] Expression to generate a single individual. |
---|---|
n | [ |
n.dim | [ |
lower | [ |
upper | [ |
[list
]