queries.Rd
This group of functions generates a symbolic representation of a query that can then be translated to different interface languages. A query is built by specifying, for each required concept, a list of concept terms (e.g. synonyms), as well as the relationship between the concepts (normally they all have to occur; sometimes there are also a number of terms to exclude).
query_conceptTerms(..., conceptName = NULL, operator = "OR")
# S3 method for class 'mbf_query_conceptTerms'
print(x, ...)
query_full(inclusion, exclusion = NULL, queryName = "query")
# S3 method for class 'mbf_query_full'
print(x, ...)
query_requiredConcepts(..., conceptName = NULL)
# S3 method for class 'mbf_query_requiredConcepts'
print(x, ...)
query_toInterfaceLang(queryObject, fields = "title", exclude = NULL)
# S3 method for class 'mbf_query_toInterfaceLang'
print(x, headingLevel = 3, ...)
For the query building functions, the concepts or terms
to combine; for the print
methods, the object to print.
The operator to use to combining concept terms.
The query object to print.
The result of a call to query_requiredConcepts
.
The result of a call to query_conceptTerms
.
The name of the query or concept.
The query object.
The fields in which to search; can currently only include 'title', 'abstract', or both.
Any terms to exclude as a character vector.
The level of the headings to use when printing.
query_full
returns an mbf_query_full
object;
query_requiredConcepts
returns an mbf_query_requiredConcepts
object;
query_conceptTerms
returns an mbf_query_conceptTerms
object;
query_toInterfaceLang
returns an mbf_query_toInterfaceLang
object; and the print methods return x
invisibly.
query_full
combines required concepts with a concept to exclude using
the NOT
operator.
query_requiredConcepts
combines sets of concept terms for each concept
using the AND
operator.
query_conceptTerms
combines terms within one concept using the OR
operator.
A query can be translated to one or more interface languages with
query_toInterfaceLang
.
query_full(
inclusion =
query_requiredConcepts(
conceptName = "inclusion",
query_conceptTerms(
conceptName="fluffiness",
"fluffy",
"hairy",
"soft"),
query_conceptTerms(
conceptName="aggression",
"aggressi*",
"predator*",
"kill*")),
exclusion =
query_conceptTerms(
conceptName = "exclude non-empirical work",
"review",
"meta-analysis"));
#> levelName
#> 1 query
#> 2 ¦--inclusion
#> 3 ¦ ¦--fluffiness
#> 4 ¦ ¦ ¦--fluffy
#> 5 ¦ ¦ ¦--hairy
#> 6 ¦ ¦ °--soft
#> 7 ¦ °--aggression
#> 8 ¦ ¦--aggressi*
#> 9 ¦ ¦--predator*
#> 10 ¦ °--kill*
#> 11 °--exclude non-empirical work
#> 12 ¦--review
#> 13 °--meta-analysis