Pairwise Procrustes Distance Matrix?

692 views
Skip to first unread message

Natalie O'Shea

unread,
Jun 9, 2017, 11:45:08 AM6/9/17
to geomorph R package

Is there a way to export a pairwise Procrustes distance matrix for all specimens after GPA alignment? (similar to the "Between OTU Procrustes chord distances" matrix included in Morphologika results)

Adams, Dean [EEOBS]

unread,
Jun 9, 2017, 12:05:04 PM6/9/17
to Natalie O'Shea, geomorph R package

Natalie,

 

If Y is a 3D array containing your landmark coordinates, try:

 

as.matrix(dist(gpagen(Y)$coords))

 

Dean

 

Dr. Dean C. Adams

Professor

Department of Ecology, Evolution, and Organismal Biology

       Department of Statistics

Iowa State University

www.public.iastate.edu/~dcadams/

phone: 515-294-3834

--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/c417abad-b615-4bd7-9bcd-ba4dd69578a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Collyer

unread,
Jun 9, 2017, 12:30:44 PM6/9/17
to Adams, Dean [EEOBS], Natalie O'Shea, geomorph R package
You you also need you use two.d.array to convert coords to a matrix before using the dust function. 

Mike

Sent from my iPhone

Adams, Dean [EEOBS]

unread,
Jun 9, 2017, 12:33:08 PM6/9/17
to Mike Collyer, Natalie O'Shea, geomorph R package

Agh yes, sorry! 

 

So that would be:

 

as.matrix(dist(two.d.array(gpagen(Y)$coords)))

 

Dean

 

Dr. Dean C. Adams

Professor

Department of Ecology, Evolution, and Organismal Biology

       Department of Statistics

Iowa State University

www.public.iastate.edu/~dcadams/

phone: 515-294-3834

 

Natalie O'Shea

unread,
Jun 9, 2017, 12:42:04 PM6/9/17
to geomorph R package, mlco...@gmail.com, ms.nata...@gmail.com
This worked wonderfully!  I was trying all sorts of complicated stuff, but it's clearly much simpler!

To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.

To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.

To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages