Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in if (any(low.bound)) { : missing value where TRUE/FALSE needed #111

Open
prairie-rex opened this issue Jun 28, 2024 · 5 comments
Open

Comments

@prairie-rex
Copy link

I am getting this error " Error in if (any(low.bound)) { : missing value where TRUE/FALSE needed" on files that used to run fine from 2022, after adjusting the data to include units() ='m' on the appropriate variables as described in the Rdistance 3.0 information. I'm getting numerous errors on a new dataset, and unable to run the same old autoDistSamp code on data from 2021/2022.

@tmcd82070
Copy link
Owner

tmcd82070 commented Jun 29, 2024 via email

@prairie-rex
Copy link
Author

prairie-rex commented Jul 1, 2024

Data:
detect=testDetect.csv
site=testSite.csv

units(site$length)='m'
units(detect$dist)='m'

When running the current github, I get a different error. Code and error below.

dfun =dfuncEstim(formula = dist ~ 1, detectionData = detect, siteData = site, pointSurvey = FALSE, likelihood="negexp",series="simple",expansion=1)
est = abundEstim(dfunc = dfun, detectionData = detect, siteData = site, area = NULL) 

Error in factorLevels[[j]] <- unique(dfunc$model.frame[, factorNames]) : attempt to select less than one element in integerOneIndex

@tmcd82070
Copy link
Owner

tmcd82070 commented Jul 9, 2024 via email

@prairie-rex
Copy link
Author

prairie-rex commented Aug 6, 2024

Hello, so in regards to the errors I've received such as "Error in F.start.limits(likelihood, expansions, w.lo, w.hi, dist, covars, :
object 'wlo' not found" and "Error in seq.default(w.lo, w.hi, length = nTrapazoids) : 'to' must be a finite number"

I've found a strange solution. In the detection data, if there is a column, such as site (used in my data), it causes the dfuncEstim() function to produce this error with some names but not others. When I remove this column, I have no trouble.

I can't figure out why one of my site names wouldn't work, because there were no numbers in it (two of the three had numbers and the word "Area" in it), but it was a site name with 27 characters (there were longer names with numbers, and "()" that worked just. For the ones that threw errors, removing the "site" column stopped the error.

Note that the function code does not include 'site' anywhere in the call.

Hopefully you can reproduce this error easily and debug, but let me know if you want examples.

@tmcd82070
Copy link
Owner

tmcd82070 commented Aug 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants