dsQueryBuild: Generate a DSL query from a set of parameters It generates a...

View source: R/dsQueryBuild.R

dsQueryBuildR Documentation

Generate a DSL query from a set of parameters It generates a valid query, written following the Dimensions Search Language (DSL), from a set of search parameters.

Description

Generate a DSL query from a set of parameters It generates a valid query, written following the Dimensions Search Language (DSL), from a set of search parameters.

Usage

dsQueryBuild(
  item = "publications",
  words = "bibliometric*",
  words_boolean_op = "OR",
  full.search = FALSE,
  type = "article",
  categories = "",
  output_fields = "basics + extras + categories + abstract",
  start_year = NULL,
  end_year = NULL
)

Arguments

item

is a character. It indicates the type of document to search. The argument can be equal to item = ("publications", "grants", "patents", "clinical_trials", "policy_documents"). Default value is item = "publications".

words

is a character vector. It contains the search terms.

words_boolean_op

is character. It indicates which boolean operator have to be used to link words. It can be c("OR","AND"). Default is "OR".

full.search

is logical. If TRUE, full-text search finds all instances of a term (keyword) in a document, or group of documents. If False, the search finds all instances in titles and abstracts only.

type

is a character. It indicates the document type to include in the search. Default is type = "article".

categories

is a character vector. It indicates the research categories to include in the search. If empty categories = "", all categories will be included in the search.

output_fields

is a character. It contains fields which have to exported. Default is c("basics","extras","categories","abstract").

start_year

is integer. It indicate the starting publication year of the search timespan.

end_year

is integer. It indicate the ending publication year of the search timespan.

Value

a character containing the query in DSL format.

For more extensive information about Dimensions Search Language (DSL), please visit: https://docs.dimensions.ai/dsl/

To obtain a free access to Dimenions API fro no commercial use, please visit: https://ds.digital-science.com/NoCostAgreement

See Also

dsApiRequest

dsAuth

dsApi2df

Examples


## Not run: 
query <- dsQueryBuild(item = "publications", words = "bibliometric*", 
                       type = "article", categories = "management", 
                       start_year=1980,end_year = 2020)

## End(Not run)


massimoaria/dimensionsR documentation built on Feb. 10, 2024, 10:38 a.m.