Learn R Programming

RKorAPClient (version 0.5.9)

queryStringToLabel: Convert query or vc strings to plot labels

Description

Converts a vector of query or vc strings to typically appropriate legend labels by clipping off prefixes and suffixes that are common to all query strings.

Usage

queryStringToLabel(data, pubDateOnly = FALSE, excludePubDate = FALSE)

Arguments

data

string or vector of query or vc definition strings

pubDateOnly

discard all but the publication date

excludePubDate

discard publication date constraints

Value

string or vector of strings with clipped off common prefixes and suffixes

Examples

Run this code
# NOT RUN {
queryStringToLabel(paste("textType = /Zeit.*/ & pubDate in", c(2010:2019)))
queryStringToLabel(c("[marmot/m=mood:subj]", "[marmot/m=mood:ind]"))
queryStringToLabel(c("wegen dem [tt/p=NN]", "wegen des [tt/p=NN]"))

# }

Run the code above in your browser using DataLab