Hi everyone,
I analyzed shape variation in my data with
morphol.disparity() function when suddenly something seemed wrong with the function. The function worked well while argument
seed = n was not provided. However, when I added the seed argument the function returned the following error.
Error: block factor not the same length as the number of observations.
I am sending you the code where the error was observed.
The code is based on the example from the function description. The geomorph version I am working on is 4.0.8. (latest to my knowledge). If my assumption that something is wrong with the function is caused by my ignorance and inexperience,
I apologize in advance.
Regards,
Mihajlo
data(plethodon)
Y.gpa <- gpagen(plethodon$land, print.progress = FALSE) #GPA-alignment
gdf <- geomorph.data.frame(Y.gpa, species = plethodon$species,
site = plethodon$site)
# Morphological disparity for entire data set
morphol.disparity(coords ~ 1, groups = NULL, data = gdf,
print.progress = FALSE, seed = 2) ## WORKS!
# Morphological disparity for entire data set, accounting for allometry
morphol.disparity(coords ~ Csize, groups= NULL, data = gdf,
print.progress = FALSE, seed = 2) ## WORKS!
# Morphological disparity without covariates, using overall mean
# without seed argument
morphol.disparity(coords ~ 1, groups= ~ species * site, data = gdf,
print.progress = FALSE) ## WORKS!
# with seed argument
morphol.disparity(coords ~ 1, groups= ~ species * site, data = gdf,
print.progress = FALSE, seed = 2) ## ERROR!