Closed AldoCompagnoni closed 7 years ago
Brad made the concatenate_queries
function!
I have made unit tests. These
A. address the 4 error messages I presented below;
B. address the expected outputs of concatenate_queries
(which should be calls, and/or calls that include and &
operator).
To close the issue, Brad will update the content of the error messages returned by concatenate_queries
. In particular:
concatenate_queries(poa_d, poa_d)
should specifically say that you entered two browse objects.concatenate_queries(year == 2000, genus == "Poa")
should specifically say that you entered two logical statements.concatenate_queries(poa_d, poa_d, obj)
should say that you specified 3 entries (not only refer to obj as source of error) I've addressed the error messages as follows: 1.
> concatenate_queries(poa_d, poa_d)
Error in concatenate_queries(poa_d, poa_d) :
You cannot enter more than one browse() argument.
Please refer to the '...' argument in ?get_data.
2.
> concatenate_queries(year == 2000, genus == "Poa")
Error in concatenate_queries(year == 2000, genus == "Poa") :
You cannot enter more than one logical argument.
Please refer to the '...' argument in ?get_data.
> concatenate_queries(poa_d, poa_d, obj)
Error in concatenate_queries(poa_d, poa_d, obj) :
You cannot enter more than two arguments:
1) an object returned by browse() and/or
2) a logical statement
Please refer to the '...' argument in ?get_data.
suggest closing this issue
I have just changed the language (sorry for being paranoid!) from "logical argument" to "logical expression", following the semantics in the subset
function in base!
This issue is closed!
Re-opening this issue, because running the code
poa_d <- browse( genus == "Poa"); concatenate_queries(poa_d)
Returns nothing.
This was a conflict that I introduced:
I forced concatenate_queries
to look for attributes(browse(genus == "Poa"))$search_expression
. However, browse
would only contain attributes(browse(genus == "Poa"))$search_argument
.
I changed search_argument
and search_expression
to search_expr
.
A function to checks the vailidity of that the
...
argument inget_data
. There are a few cases of "legal"...
input inget_data
: 1a. A browse object 1b. A browse call (eg.get_data( browse(genus == "poa") )
)There are at least four error cases
...