readland.nts error - array is backwards

77 views
Skip to first unread message

jane.g...@gmail.com

unread,
Mar 13, 2021, 4:13:44 AM3/13/21
to geomorph R package
Hello everyone,

I recently replaced my hard drive and re-installed everything.
I am currently running R version 4.0.4 and geomorph 3.3.2.
I tried to read some files into geomorph and am having a very particular problem.

I have a dataset of 14 3D landmarks on specimens and am using the same code which has worked perfectly well in the past for reading in landmark data (landmarks were taken in geomorph just as they were in the past and this problem is the same with both old and new files).

When I try "readland.nts("filename"), it should give me an array of 14 X 3 X 1, but is currently giving me instead an array of 1 x 3 x 14. 

When I try to use readmulti.nts I have the same problem. Loading in the first 35 specimens should give me an array of 14 x 3 x 35, but is instead giving me an array of 1 x 3 x 490. 

I have tried googling around to see if this is a known bug or some such for the current version, but haven't had any luck.

Does anyone know what might be going wrong?  

Cheers,
Jane

Antigoni Kaliontzopoulou

unread,
Mar 13, 2021, 7:44:24 AM3/13/21
to geomorph-...@googlegroups.com
Hi Jane, 

this is not easy to solve without looking at the files you are trying to read in. If you want write to me offline and send me say 5 of the nts files you are trying, so I can have a look.

Cheers,
Antigoni

--
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 view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/8f96ce70-e5b2-48f8-bcca-5b994dcf283dn%40googlegroups.com.


--

Chris Torres

unread,
May 24, 2021, 8:14:27 PM5/24/21
to geomorph R package
Hi all,

Was a resolution ever found for this issue?

I'm facing what I think is a similar, or perhaps the same, issue: the current version of geomorph on my machine seems to be writing .nts files with incorrect headers.

Instead of writing the proper 1 n [p*k] 0 dim=3 header (assuming 3D data) when it outputs .nts files, it seems to be writing 1 p k 0 dim=3 (where n = # of specimens/species, p = # of landmarks, k = # of dimensions and p*k is a single value representing # of landmarks times # of dimensions). In other words, there doesn't seem to be a value for number of specimens. Indeed, when I read in multiple .nts files at once using the read multi.nts() function, I experience the phenomenon that Jane describes above: all of the data for all the species get dumped into the same column (i.e. the third).

The obvious work-around I'm using is manually editing the headers of .nts files so that they contain the correct information, which then allows me to correctly read them back into R. However, this will become cumbersome with many .nts files.

Any ideas what might be going wrong (either with me or the code)?

Thanks!
Chris

Adams, Dean [EEOB]

unread,
May 25, 2021, 9:16:38 AM5/25/21
to geomorph-...@googlegroups.com

Chris et al.,

 

Please install the latest version of geomorph from github: a small adjustment was made to account for this.

 

devtools::install_github(‘geomorphR/geomorph’, ref=’Stable’)

 

Also, a small note on the ‘proper nts header’ comment.  Please read carefully the help files in geomorph.  In actuality, both header types are correct, and both are adjusted NTSYS headers.  The ‘pure’ NTSYS header goes all the way back to the original mainframe version of NTSYS, from 1969.  That version cannot easily accommodate GMM data, so with the first version of geomorph we adjusted the header information slightly (note also that other digitizing software does much the same).

 

In geomorph, when one has multiple specimens in a single NTS file, the 1 n pxk 0 dim = approach is correct. But if there is only a single specimen in a file (as is the output from say, ‘digit.fixed’, this header format is insufficient to designate the specimen dimensionality.  Thus, the 1 p k 0 dim= approach is used.

 

Dean

 

Dr. Dean C. Adams

Director of Graduate Education, EEB Program

Professor

Department of Ecology, Evolution, and Organismal Biology

Iowa State University

https://faculty.sites.iastate.edu/dcadams/

phone: 515-294-3834

Chris Torres

unread,
May 25, 2021, 10:20:08 AM5/25/21
to geomorph R package
Hi Dean,

Thanks for this, and thanks for the information!

Chris
Reply all
Reply to author
Forward
0 new messages