dict_from_string: Create a dictionary from a string format

View source: R/dictionary.r

dict_from_stringR Documentation

Create a dictionary from a string format

Description

This is a convenience function for typing queries in R. See examples below for how to use the function.

Usage

dict_from_string(txt)

Arguments

txt

A string in which each line is a query. If the line contains a "=" sign, the left side becomes the label, and the right side the query. See examples below.

Value

A query dictionary

Examples


dict_from_string('
   Barack Obama = "(barack OR president) obama"
   spices = parsley OR sage OR rosemary OR thyme
')

kasperwelbers/textquery documentation built on Dec. 24, 2024, 12:47 a.m.