as.matrix.Niche {galgo}R Documentation

Converts the chromosome values (genes) to a matrix

Description

Converts the chromosome values (genes) to a matrix. Chromosomes are rows and genes are columns.

Usage

## S3 method for class 'Niche':
as.matrix(x, fitness=FALSE, ...)

Value

Returns a matrix containig the genes for all chromosomes. Chromosomes are rows and genes are columns.

Author(s)

Victor Trevino. Francesco Falciani Group. University of Birmingham, U.K. http://www.bip.bham.ac.uk/bioinf

References

Goldberg, David E. 1989 Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Pub. Co. ISBN: 0201157675

See Also

For more information see Niche. *print().

Examples

  cr <- Chromosome(genes=newCollection(Gene(shape1=1, shape2=1000),5))
  ni <- Niche(chromosomes=newRandomCollection(cr, 10))
  ni
  as.matrix(ni) # almost the same
  as.matrix.Niche(ni, fitness=TRUE) # tricky undocumented version

[Package galgo version 1.0-10 Index]