função
size.cluster = function(x,y){
dados1 = aggregate(.~ Perna, data=x, sum)
## Soma as medidas de cada articulo da perna, fornecidas pelo usuário
dados2 = apply(dados1, MARGIN=2, FUN=prod)
## Multiplica as medidas de cada perna, para ter um total para cada individuo
library(cluster)
## Chama a função para fazer uma distribuição de clusters
pam.res=pam(scale(dados2),y)
## escala os dados e calcula o PAM para y grupos de dados
pam.res$medoids
## tira as “medoids”, “médias” inseridas em um data.set
head(pam.res$cluster)
## busca os vetores de agrupamento
final = clusplot(pam.res, main = "Cluster plot, k = y", color = TRUE)
## faz o gráfico dos y agrupamentos.
return(final)
}
HELP
Cluster size analises
Description
size.cluster returns a cluster graphic for the multiplicative size for all legs in a arthropod, after making the sum of all the segments in each leg. Usage
size.cluster (x,y) Arguments
x Data table for the size of each leg segment, of each animal y Number of data groups expected to be clustered
Details
This function is used to analize the results of the measurements done with imagej software. The resulting table, with the measurements of each segment in a animal leg is summed, and the total size of each leg is multiplied and the resulting number is compared to the other animals.
Value
It facilitates the work of comparing the results for size comparison photographs for arthropods
References
Gnaspini, P. (1996). Population ecology of Goniosomu spelueum, a cavernicolous harvestman fromsouth-eastern Brazil (Arachnida: Opiliones: Gonyleptidae. J. Zool., Lond. 239,417-435.