Learn R Programming

windfarmGA (version 2.3.0)

splitAt: Divide matrices or integer at certain locations

Description

Required function for the crossover method to split a genetic code at random intervals. See also crossover.

Usage

splitAt(x, pos)

Arguments

x

A numeric variable representing the binary genetic code of an individual (numeric)

pos

A numeric value which shows at which position the genetic code is cut (numeric)

Value

Returns a list of the splitted genetic code.

See Also

Other Helper Functions: dup_coords(), getDEM(), getISO3(), get_grids(), grid_area(), hexa_area(), isSpatial(), permutations(), readintegerSel(), readinteger(), tess2SPdf(), windata_format()

Examples

Run this code
# NOT RUN {
splitAt(1:100,20)
splitAt(as.matrix(1:100),20)

# }

Run the code above in your browser using DataLab