[R] R_nls_iter error: REAL() can only be applied to a 'numeric', not a 'logical'

matthewbk matthew_bk8 at hotmail.com
Wed Aug 1 18:40:53 CEST 2012


Hi

I am using the nls function in R however it is causing the following error:
REAL() can only be applied to a 'numeric', not a 'logical'

Using traceback shows this occurs after the .Call(R_nls_iter, m, ctrl,
trace) call. However I do not know how to debug this further to find out
what is causing the error.

The data I give the nls call definitely starts as numeric. The data.frame is
generated by using the following:

d = data.read('data.csv', header=FALSE)
x = as.numberic(d[,1])
y = as.numberic(d[,2])
z = as.numberic(d[,3])
...

dat = data.frame(x,y,z...)

nls is started by calling:
mdl = nls(y ~ Model(x,y,z....,b1,b2,b3), data = dat)

Thanks in advance for any help.

Matthew




--
View this message in context: http://r.789695.n4.nabble.com/R-nls-iter-error-REAL-can-only-be-applied-to-a-numeric-not-a-logical-tp4638717.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list