as.matrix.Niche {galgo} | R Documentation |
Converts the chromosome values (genes) to a matrix. Chromosomes are rows and genes are columns.
## S3 method for class 'Niche': as.matrix(x, fitness=FALSE, ...)
Returns a matrix containig the genes for all chromosomes. Chromosomes are rows and genes are columns.
Victor Trevino. Francesco Falciani Group. University of Birmingham, U.K. http://www.bip.bham.ac.uk/bioinf
Goldberg, David E. 1989 Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Pub. Co. ISBN: 0201157675
For more information see Niche
.
*print()
.
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