----- Forwarded message from Emma Sherratt
<sherr...@iastate.edu> -----
Date: Wed, 4 Dec 2013 10:42:06
-0500
From: Emma Sherratt <sherr...@iastate.edu>
Reply-To: Emma Sherratt <sherr...@iastate.edu>
Subject: Re:
sliding landmarks in geomorph
To: Morphmet
<morphmet@morphometrics.org>
Dear Corey,
I believe I have resolved your query to
you personally, but I wanted to put a summary of the issue for other
users.
First of all, the way that the curve2d function works is not so clear in the
help file (and I have resolved this for the next version of Geomorph). The
function works in an overlapping way. By that I mean for a set of 6 landmarks
defining a curve, where 1 and 6 are the "fixed ends" there are 4 sliders:
2 slides between 1
and 3, so I would click on 1 then 2 then 3, and the first line of the output
would be 1 2 3.
Next, 3 slides between 2 and 4, so 2 3 4 is the second line
4 slides between 3 and 5 then finally 5
slides between 4 and 6.
so we wend up with
a curveslide.csv file:
1 2 3
2 3 4
3 4 5
4 5 6
and if the user designated an object for this, it is output as a LIST. ie.
curves <- curve2d("myfile.nts", 6)
mycurve$sliders is the matrix to be used in
a GP analysis.
gpagen(mydata, curves=mycurve$sliders,
ProcD=TRUE)
So the reason Corey had the error: (list) object cannot be coerced to type
‘integer’”.
is because the $sliders was not added to the
object in the gpagen function.
We apologise that the help file did not
clearly state the output into R was a LIST. The LIST format of this output is a
relic from an old version and will likely be changed in the update.
Hope that clears things up
Best
wishes,
Emma
co-author of Geomorph (http://www.geomorph.net/)
__ (\ .-. .-. /_") \\_//^\\_//^\\_// `"` `"` `"`Emma Sherratt
Postdoctoral fellow in department of
Ecology,
Evolution, and Organismal Biology
On 28 November 2013 03:58, <morphmet_modera...@morphometrics.org>
wrote:
----- Forwarded message from Corey Handelsman <chandels...@gmail.com> -----
Date: Tue, 26 Nov 2013 13:07:49 -0500
From: Corey Handelsman <chandels...@gmail.com>
Reply-To: Corey Handelsman <chandels...@gmail.com>
Subject: sliding landmarks in geomorph
To: morphmet-requ...@morphometrics.org
Hi All,
I am struggling to perform a GPA in geomorph with a dataset that contains sliding landmarks. I am able to read in the TPS file and perform the GPA with the gpagen function if I ignore the sliding landmarks. However, if I try to run the GPA with sliding landmarks that were extracted with the curves2d function, gpagen returns the following error:
"Error in gpagen(field.cl, curves = sliders) : (list) object cannot be coerced to type ‘integer’”.
There are a couple things I’m not quite grasping. First, is there a way to import the TPS file using readland.tps in integer format? If so, I’m unclear why I would want/need to convert the landmark coordinates from numeric to integer. This seems like it would introduce a lot of rounding error. Further, there doesn’t seem to be a simple way to convert from numeric to integer without losing the structure of the array. Any suggestions on how to proceed would be greatly appreciated.
Cheers,
Corey
Corey Handelsman
PhD Candidate
Department of Biology
Colorado State University
Fort Collins, Colorado
email: chandels...@gmail.com
----- End forwarded message -----
----- End forwarded message
-----