Learn R Programming

adana (version 1.1.0)

maxone: MAXONE fitness function

Description

Fitness function that calculates the number of 1s in each individual

Usage

maxone(x, ...)

Arguments

x

A vector

Further arguments passed to or from other methods.

Value

Number of 1s

See Also

maxone1, maxone2, minone

Examples

Run this code
# NOT RUN {
C2 = c(1, 1, 1, 0, 1, 0, 0, 0)
maxone(C2)
C3 = c(1, 1, 1, 1, 1, 1, 1, 1)
maxone(C3)
# }

Run the code above in your browser using DataLab