Learn R Programming

GA (version 3.2.4)

summary.ga-method: Summary for Genetic Algorithms

Description

Summary method for class ga-class.

Usage

# S4 method for ga
summary(object, ...)

# S3 method for summary.ga print(x, digits = getOption("digits"), ...)

Value

The summary function returns an object of class summary.ga which can be printed by the corresponding print method. The function also returns invisibly a list with the information from the genetic algorithm search.

Arguments

object

an object of class ga-class.

x

an object of class summary.ga.

digits

number of significant digits.

...

further arguments passed to or from other methods.

Author

Luca Scrucca

See Also

ga

Examples

Run this code
f <- function(x)  abs(x)+cos(x)
GA <- ga(type = "real-valued", 
         fitness = function(x) -f(x), 
         lower = -20, upper = 20, run = 50)
out <- summary(GA)
print(out)
str(out)

Run the code above in your browser using DataLab