geomorphR/geomorph

Error using interlmkdist

Closed this issue · 4 comments

Below is my data matrix for an individual fish and the code for the matrix of landmarks. When I run the code:
results<-interlmkdist(fish4.my.matrix, lmks.fish)
I get the following error: Error in if (d2 == 0L) { : missing value where TRUE/FALSE needed
Nowhere in the help is there an indication that I need to specify a T/F condition.

3D landmark matrix
[,1] [,2] [,3]
[1,] 17.05520 15.74733 47.53114
[2,] 18.24270 16.37591 13.80993
[3,] 18.26952 14.62078 36.91296
[4,] 17.47745 14.66896 45.51792
[5,] 17.81121 14.29797 42.46868
[6,] 19.19132 15.18134 44.18545
[7,] 16.22816 14.19615 43.82030
[8,] 18.85477 17.90548 44.49008
[9,] 17.74299 15.93717 46.60321
[10,] 12.22052 16.57722 41.40556
[11,] 21.12792 16.40635 40.99355
[12,] 16.60012 14.49540 45.99598
[13,] 17.00166 14.45665 45.33425
[14,] 13.73537 14.54041 43.24696
[15,] 22.47910 18.22723 36.52447
[16,] 12.33789 16.22062 35.58069
[17,] 15.76807 15.12796 47.85163
[18,] 14.03573 14.53654 44.37166
[19,] 12.28796 16.51153 34.48584
[20,] 20.55820 16.84872 15.26186
[21,] 11.95594 17.67173 28.60648
[22,] 15.20270 17.18918 15.73366
[23,] 15.17435 16.65157 14.40329
[24,] 20.62033 16.92799 13.72122
[25,] 20.59991 16.83949 14.25169
[26,] 15.31551 16.77876 14.41184
[27,] 18.27195 16.41246 16.59344

Code for landmark matrix:
lmks.fish<-matrix(c(1,2,1,3,1,4,5,3,4,5,6,7,6,8,12,13,1,9,7,14,17,18,10,11,15,16,1,15,1,19,15,20,15,21,15,22,20,21,20,22,20,23,22,24,15,19,20,19,27,2,25,26), ncol=2, byrow=TRUE, dimnames=list(c("SL", "HL", "SNL", "POHL", "HED", "VED", "IW", "PRE", "PREM", "CD", "LJL", "HD", "BD", "SNDOR", "SNPEL", "DFBL", "ADAA", "ADPA", "PDAA", "PDPA", "PDVC", "PADC", "ADP2", "PDP2", "CPL", "LCPD"),c("start", "end")))

I have updated the script to detect and adjust a single matrix of landmarks to be an array. It should work now, but please check with your example.

Mike

I do ultimately want to run this on multiple specimens, I just can't figure out the data format to handle multiple specimens. Therefore, I tried it on a single individual (my mistake). My data comes in the format of the attached excel file (which I use as a csv). I read in the csv and convert to a matrix. I cannot figure how to separate individuals within the matrix (i.e. in your plethodon data, $land). I know this is a novice question. Diving in head first.

mintermed_101079_3.xlsx