nyTags: Access NY Times tag set for controlled vocabularies

View source: R/NYTimes.R

nyTagsR Documentation

Access NY Times tag set for controlled vocabularies

Description

This function retrieves information about the NY Times tag sets which are used for NY Times meta data. For a given string, the service returns a ranked list of suggested terms from the tags/vocabularies.

Usage

nyTags(query, filter = character(), ..., key = getOption("NYTimesAPI")["Tags"])

Arguments

query

the string to map to tags

filter

character vector giving the names of dictionaries to which to limit the results, e.g. Geo, Des, Per, Org. See the service API for a description of these. These should not be contained with parentheses. These are added by the function.

...

additional parameters to be submitted as part of the form

key

the NY Times API key for the Tags service

Value

A named character vector. The values are the tags. The names give the dictionary from which the tag came.

Author(s)

Duncan Temple Lang

References

http://developer.nytimes.com/docs/timestags_api

Examples

if("NYTimesAPI" %in% names(options()) && "Tags" %in% names(options("NYTimes"))) {
  nyTags("climate")
}

omegahat/RNYTimes documentation built on Nov. 29, 2023, 12:39 a.m.