Anneke,

I'm gad you've managed to solve your issue but I need to say that making
your data a 3D array shouldn't be the fix.

> library(geomorph)
Loading required package: rgl
> data(plethspecies)
> Y.gpa<-gpagen(plethspecies$land)    #GPA-alignment
>
> #Test for phylogenetic signal in shape using data in a 3D array
> physignal(plethspecies$phy, Y.gpa$coords, method="Kmult",iter=99)
$phy.signal
          [,1]
[1,] 0.9572538

$pvalue
     [,1]
[1,] 0.04

> #Test for phylogenetic signal in shape using data in a 2D matrix
> physignal(plethspecies$phy, two.d.array(Y.gpa$coords),
method="Kmult",iter=99)
$phy.signal
          [,1]
[1,] 0.9572538

$pvalue
     [,1]
[1,] 0.02

So there must have been something wrong with your 2D matrix to not work
previously. Check that it is numeric, check that the rownames were assigned
properly, and that it contained only the data you wanted to input.

FYI, in geomorph, we use the 3D array format to specify that the data are
coordinate data, and the 2D matrix for multivariate data, not necessarily
shape data. This allows several of the functions to be used with non-shape,
multivariate datasets.

Emma

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Emma Sherratt, PhD.

Lecturer in Zoology,
Zoology Division, School of Environmental and Rural Science,
Room L112 Bldg C02,
University of New England,
Armidale, NSW, Australia, 2351
Tel: +61 2 6773 5041
email: emma.sherr...@une.edu.au
Twitter: @DrEmSherratt

Caecilians are legless amphibians...

*                      __
    (\   .-.   .-.   /_")
     \\_//^\\_//^\\_//
      `"`   `"`   `"`*

learn more about them here: www.emmasherratt.com/caecilians




On 15 June 2015 at 20:24, Anneke van Heteren <a.h.vanhete...@gmail.com>
wrote:

> Dear all
>
> Thank you very much to those who have replied to my question. It turned
> out that my data was a 2D matrix instead of a 3D array and that that was
> causing the problem.
>
> Best wishes,
>
> Anneke
>
>
> On Thursday, June 11, 2015 at 1:41:55 PM UTC+2, Anneke van Heteren wrote:
>>
>> Dear friends and colleagues
>>
>>
>>
>> I am trying to run physignal in geomorph (R), but I am running into a
>> problem I do not understand. Here is the code I am using and the error
>> message:
>>
>> > physignal(ursid_phyl, Regr_res_av, iter=99)
>>
>> Error in match.names(clabs, names(xi)) :
>>
>>   names do not match previous names
>>
>>
>>
>> However:
>>
>> > name.check(ursid_phyl,Regr_res_av)
>>
>> [1] "OK"
>>
>>
>>
>> But:
>>
>> > match(ursid_phyl,Regr_res_av)
>>
>> [1] NA NA NA NA
>>
>> > match(Regr_res_av,ursid_phyl)
>>
>>  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
>>
>> [24] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
>>
>>
>>
>> This suggested to me that physignal might need the columns to carry the
>> same names rather than the rows (as my phylogeny is list of 4 and I have 15
>> landmarks=45 variables), but when I transposed my data, I get a different
>> error message:
>>
>> > trans_regr_res_av <-t(Regr_res_av)
>>
>> > physignal(ursid_phyl, trans_regr_res_av, iter=99)
>>
>> Error in physignal(ursid_phyl, trans_regr_res_av, iter = 99) :
>>
>>   Number of taxa in data matrix and tree are not not equal.
>>
>>
>>
>> I do not know what I could try next to calculate physignal. Any help
>> would be appreciated. This is the phylogeny that I am using:
>>
>>
>>
>> (Ame:21.8,(Tor:14.5,((Uam:5.7,(Uth:3.3,(Usp:1.2,(Uma:1.0,Uar:1.0):0.2):2.1):2.4):0.0,(Hma:1.0,Mur:1.0):4.7):8.8):7.3);
>>
>>
>> Thanks in advance.
>>
>>
>>
>> Best wishes,
>>
>>
>>
>> Anneke van Heteren
>>
>>
>>
>>
>>  --
> MORPHMET may be accessed via its webpage at http://www.morphometrics.org
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to morphmet+unsubscr...@morphometrics.org.
>

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org

To unsubscribe from this group and stop receiving emails from it, send an email 
to morphmet+unsubscr...@morphometrics.org.

Reply via email to