Closed dlebauer closed 7 years ago
@dlebauer i don't quite understand what you mean, can you clarify?
The expect_false(mxg == pavi)
test fails.
I would expect different results when querying data for different species. I assume the command
betydb_traits(genus = 'Panicum', species = "virgatum")
To be (roughly) equivalent to the sql query:
select * from traits where genus = 'Panicum' and species = 'virgatum';
Seems to be the API, so I submitted the bug PecanProject/bety#224
Next time I will be more careful :boom:
was just testing, seems to be the API gives the same results
@dlebauer can this be closed?
Yes it can be closed On Tue, Mar 21, 2017 at 3:34 PM Scott Chamberlain notifications@github.com wrote:
@dlebauer https://github.com/dlebauer can this be closed?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/traits/issues/21#issuecomment-288193483, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcX5yYwxmcmeX_sewqOfL6zkItIbtTWks5roCZOgaJpZM4Dd_NG .
thanks @dlebauer
When I pass different genus and species arguments to the
betydb_traits
function, the results should be different.Specifically, there should be no overlap in the result sets since the results will be associated with one species or the other but not both.
The functions
betydb_traits
andbetydb_yields
are currently commented out in the source code (end of R/betydb.R) because they don't work, but the following should work:Errors presumably related to composing valid url's (see traceback, below). The Url-based API is defined in section 3 of the "Data Access" documentation (https://www.authorea.com/users/5574/articles/7062/_show_article). But the following should are valid urls:
These API calls work:
and can also return contents of site, species, citations, treatments tables by appending
&include[]=specie&include[]=site
I've added a test that should pass (currently wrapped in
expect_error
, as they give errors): if the genus and species arguments are used in the query, the results should be different. The test doesn't currently pass because the results are not filtered by genus / species, so I have commented it out.... the current error / traceback is goes to constructing the url
However, it would be faster to pull meta-data records and do joins on the client side, e.g.