R: NA/NaN/Inf in foreign function call (arg 1)

Posted by Ma Changchen on Stack Overflow See other posts from Stack Overflow or by Ma Changchen
Published on 2012-09-12T14:53:46Z Indexed on 2012/09/15 3:38 UTC
Read the original article Hit count: 545

Filed under:
|
|

When i use a package named HydroMe to fit a model, some data groups will return the following errors:

Error in qr.default(.swts * attr(rhs, "gradient")) : 
 NA/NaN/Inf in foreign function call (arg 1)

Actually,there is no missing value in the data groups. the codes are as followed:

library(HydroMe)
fortst<-read.csv(file="F:/fortst.csv")
van.lis <-nlsList(y~SSvan(x,Thr, Ths, alp, scal)|Sample,data=fortst)

datas are as following:

    Sample  x   y
1116    0.000001    0.4003
1116    10  0.3402
1116    20  0.3439
1116    30  0.3432
1116    40  0.3426
1116    60  0.3379
1116    90  0.3325
1116    180 0.3212
1116    405 0.3033
1116    810 0.2843
1116    1630    0.2659
1117    0.000001    0.3785
1117    10  0.3173
1117    20  0.3199
1117    30  0.3193
1117    40  0.3179
1117    60  0.313
1117    90  0.308
1117    180 0.2973
1117    405 0.2789
1117    810 0.2608
1117    1630    0.2405

the example data can be downloaded from here.

© Stack Overflow or respective owner

Related posts about r

    Related posts about function