Hi Dan, The error message is straightforward: it is an issue with your data. The error message and tells you that there are differing numbers of observations somewhere: in your gpagen output, your sex, your locality, or some combination. Check the upstream code in your data preparation pipeline to confirm that you haven’t deleted some specimens in one or more of the components that you are trying to combine.
Below is an example replicating the error you found. In the first example, all components have the same number of observations so all is copesetic. In the second, I delete one specimen in the ‘species’ vector, but not in the corresponding site and shape components. When I try to combine these I get the same error you found: just as I should. Best, Dean ### data(plethodon) Y.gpa <- gpagen(plethodon$land) gdf <- geomorph.data.frame(Y.gpa, spec = plethodon$species, site = plethodon$site) plethodon$species <- plethodon$species[-30] #delete one gdf2 <- geomorph.data.frame(Y.gpa, spec = plethodon$species, site = plethodon$site) Error in geomorph.data.frame(Y.gpa, spec = plethodon$species, site = plethodon$site) : Inputs have different numbers of observations ### Dr. Dean C. Adams (he/him) Distinguished Professor of Evolutionary Biology Department of Ecology, Evolution, and Organismal Biology Iowa State University https://faculty.sites.iastate.edu/dcadams/ phone: 515-294-3834 From: morphmet2@googlegroups.com <morphmet2@googlegroups.com> On Behalf Of Dan Sinopoli Sent: Tuesday, June 6, 2023 4:26 PM To: Morphmet <morphmet2@googlegroups.com> Subject: [MORPHMET2] Error message from geomorph.data.frame Hi All, I am trying to build a data frame using the 'geomorph.data.frame' function from Procrustes coordinates and factors in list form and I get the error message below. I checked the lengths on both of my factor lists and they are the same. hddf<-geomorph.data.frame(hdgpa, sex=hdsex, locality=hdlocal) Error in geomorph.data.frame(hdgpa, sex = hdsex, locality = hdlocal) : Inputs have different numbers of observations Does anyone know a solution? Cheers, Dan Sinopoli -- You received this message because you are subscribed to the Google Groups "Morphmet" group. To unsubscribe from this group and stop receiving emails from it, send an email to morphmet2+unsubscr...@googlegroups.com<mailto:morphmet2+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/morphmet2/5a4297eb-8a2a-42eb-b7dd-11467f10d3a8n%40googlegroups.com<https://groups.google.com/d/msgid/morphmet2/5a4297eb-8a2a-42eb-b7dd-11467f10d3a8n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Morphmet" group. To unsubscribe from this group and stop receiving emails from it, send an email to morphmet2+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/morphmet2/CO6PR04MB842755092A11C45F5921E7A3A252A%40CO6PR04MB8427.namprd04.prod.outlook.com.