----- Forwarded message from Emma Sherratt <sherr...@iastate.edu> -----

Date: Tue, 1 Apr 2014 16:18:15 -0400
From: Emma Sherratt <sherr...@iastate.edu>
Reply-To: Emma Sherratt <sherr...@iastate.edu>
Subject: Re: Identify groups in R
To: Morphmet <morphmet@morphometrics.org>, aquelgmen...@gmail.com

Dear Raquel,

For any analysis using groups in geomorph, what you need to do is create a vector as long as the number of specimens in your datamatrix, and for each specimen in the order they appear in your 2D or 3D array, enter in A, B C etc into the vector, or whatever you want to designate each group. Then you must set it as a factor() to use it in the functions where group is specified.

Or if you are not comfortable with R yet, you can do this in excel. In column 1, put the specimen Id, in column 2, the group assignment, and then read the file in as a csv using read.csv. Just make sure you set it as a factor.

See here for a nice tutorial about factors: http://www.stat.berkeley.edu/classes/s133/factors.html

Emma

                      __
    (\   .-.   .-.   /_")
     \\_//^\\_//^\\_//
      `"`   `"`   `"`
Emma Sherratt
Postdoctoral fellow in department of Ecology, 
Evolution, and Organismal Biology

Iowa State University
Ames, IA 50011
www.emmasherratt.com


On 1 April 2014 14:26, <morphmet_modera...@morphometrics.org> wrote:


----- Forwarded message from morphmet_modera...@morphometrics.org -----

Date: Tue, 01 Apr 2014 00:50:39 -0700
From: morphmet_modera...@morphometrics.org
Reply-To: morphmet_modera...@morphometrics.org
Subject: Identify groups in R
To: morphmet@morphometrics.org


----- Forwarded message from Raquel Mendes <raquelgmen...@gmail.com> -----

Date: Tue, 18 Mar 2014 12:55:27 -0400
From: Raquel Mendes <raquelgmen...@gmail.com>
Reply-To: Raquel Mendes <raquelgmen...@gmail.com>
Subject: Identify groups in R
To: morphmet@morphometrics.org

Dear all,

I´m trying to read and analyze my landmark data with R. I have upload a tps file from tpsdig2, with 26 landmarks/specimen; ID and scale factor and preformed a procrustes superimposition.

My problem is in analysing groups in subsequent analysis, since group information is included within the ID for each specimen. How do I tell R which specimen belongs to each group? Should I be using other types of dataset? I´m fairly new at R and any help would be most appreciated.

Thank you in advance.

Best,



Raquel Mendes



----- End forwarded message -----





----- End forwarded message -----






----- End forwarded message -----



Reply via email to