Learn R Programming

CEGO (version 2.4.3)

designRandom: Random Design

Description

Create a random initial population or experimental design, given a specifed creation function, as well as a optional set of user-specified design members and a maximum design size. Also removes duplicates from the design/population.

Usage

designRandom(x = NULL, cf, size, control = list())

Value

Returns list with experimental design without duplicates

Arguments

x

Optional list of user specified solutions to be added to the design, defaults to NULL

cf

Creation function, creates random new individuals

size

size of the design

control

not used

See Also

optimRS, designMaxMinDist

Examples

Run this code
# Create a design of 10 permutations, each with 5 elements
design <- designRandom(NULL,function()sample(5),10)
# Create a design of 20 real valued 2d vectors
design <- designRandom(NULL,function()runif(2),20)

Run the code above in your browser using DataLab