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

bigsearch uses wrong mappable query #46

Closed
ptitle opened this issue Nov 30, 2015 · 4 comments
Closed

bigsearch uses wrong mappable query #46

ptitle opened this issue Nov 30, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@ptitle
Copy link

ptitle commented Nov 30, 2015

If I run the following code:
bigsearch(genus = 'Crotalus', mappable = TRUE, rfile = 'Crotalus_vertnet', email = 'myemail@myemail.edu')

... I quickly get an email with the resulting file, which has zero records.
But in the email, the query reads: "Query: genus:Crotalus mappable:true"

I believe it should be "mappable:1".
I haven't checked to see if this is happening for all logical flags.

@vijaybarve
Copy link
Contributor

@ptitle You are right. The function call should be

bigsearch(genus = 'Crotalus', mappable = 1, rfile = 'Crotalus_vertnet', email = 'myemail@myemail.edu')

returned me

Query: genus:Crotalus mappable:1
Matching records: 21177

@ptitle
Copy link
Author

ptitle commented Nov 30, 2015

In that case, the documentation for the function should be adjusted, as it says mappable is logical, which most people would assume means TRUE or FALSE.

@sckott
Copy link
Contributor

sckott commented Nov 30, 2015

hmm, testing right now

@sckott
Copy link
Contributor

sckott commented Nov 30, 2015

looks like mappable works in searchbyterm() function, but I forgot to update the internal code in bigsearch() function. It makes more sense to have a user pass a logical, so internally in searchbyterm() we convert logical to 1/0. I'll implement that in bigsearch() and push up a new patch version soon.

This also applies to the parameters media and tissue

@sckott sckott self-assigned this Nov 30, 2015
@sckott sckott added the Bugs label Nov 30, 2015
@sckott sckott added this to the v0.4.1 milestone Nov 30, 2015
@sckott sckott closed this as completed in 999d52c Dec 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants