blob: 67d138c08c77fe9bf472135a55cd022dd486a241 [file] [log] [blame]
Marc Kupietz95240e92019-11-27 18:19:04 +01001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/misc.R
3\name{queryStringToLabel}
4\alias{queryStringToLabel}
5\title{Convert query or vc strings to plot labels}
6\usage{
Marc Kupietz62d29a12020-01-18 12:38:36 +01007queryStringToLabel(data, pubDateOnly = F, excludePubDate = F)
Marc Kupietz95240e92019-11-27 18:19:04 +01008}
9\arguments{
10\item{data}{string or vector of query or vc definition strings}
Marc Kupietz62d29a12020-01-18 12:38:36 +010011
12\item{pubDateOnly}{discard all but the publication date}
13
14\item{excludePubDate}{discard publication date constraints}
Marc Kupietz95240e92019-11-27 18:19:04 +010015}
16\value{
17string or vector of strings with clipped off common prefixes and suffixes
18}
19\description{
20Converts a vector of query or vc strings to typically appropriate legend labels
21by clipping off prefixes and suffixes that are common to all query strings.
22}
23\examples{
24queryStringToLabel(paste("textType = /Zeit.*/ & pubDate in", c(2010:2019)))
25queryStringToLabel(c("[marmot/m=mood:subj]", "[marmot/m=mood:ind]"))
26queryStringToLabel(c("wegen dem [tt/p=NN]", "wegen des [tt/p=NN]"))
27
28}