You are here

Error in single.na(to) : argument is missing, with no default

2 posts / 0 new
Last post
neale's picture
Offline
Joined: 07/31/2009 - 15:14
Error in single.na(to) : argument is missing, with no default

Hi

Anyone have any idea what this error message means?

Error in single.na(to) : argument is missing, with no default
Calls: mxModel -> mxPath -> generatePath -> single.na
Execution halted

I hesitate to post the script, 308 lines at present...

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
Hi Mike, On line 74 of your

Hi Mike,

On line 74 of your script, I found the line to=c(,'CO21','CO22','CO23'). There's an extra comma before the 'CO21' in the call to c(). Believe it or not, "argument missing, with no default" is the error that R reports for this condition. I tried evaluating sum(c(,1,2,3)) and I got the same useless error message. I submitted a bug report to the R developers pointing out this was not a good error message. I pass the buck to the R team. In the meantime, when you get a cryptic error message you can use the command traceback() in R. After you get an error, using traceback() will produce a stack of the functions that were invoked up to point of the error. It's useful in determining where an error is occuring. Happy (bug) hunting.

Log in or register to post comments