Hi all,

I hope someone can help me out here as I've been wracking my brain trying to 
figure out what the problem is. In short, I'm trying to fit a bunch of pathway 
models with the rayDISC function in corHMM, which I've done before with no 
issues. However, on this occasion the model just isn't running and returning 
the following error message:-

Error in 1:nchar(as.character(string)) : NA/NaN argument

This is not the most helpful message, particularly as no part of it seems to 
appear in the code for rayDISC so I assume it's an error from something that 
the function is calling itself. I have loaded the example data provided with 
the package and ran the same code I was using on the tree and an equivalent 
trait from the example data and this runs fine. I have tried comparing the 
structures of both the tree and data from the example to my own and I can't 
find a difference. There are a few NAs in my dataset but the function can 
handle this (a statement I verified by manually introducing NAs into the 
example data and it still runs). The tree has no polytomies or zero-length 

I've attached my tree and a highly simplified version of the dataset and code 
I've been using (trimmed down to leave a simple example that reproduces the 
error message), I'd be very grateful if someone can figure out what's going on 

Best wishes,


Dr Kevin Arbuckle
Lecturer in Biosciences (Evolutionary Biology)
College of Science
Swansea University
Singleton Park

Attachment: data example.csv
Description: data example.csv

Attachment: reproducible example.R
Description: reproducible example.R

Attachment: tree.nwk
Description: tree.nwk

R-sig-phylo mailing list - R-sig-phylo@r-project.org
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to