iwhich: Query a 'parsed' object

Description Usage Arguments Value

View source: R/scripts.R

Description

This function is to perform queries on the data object parsed , such as produced by iparse.

Usage

1
iwhich(parsed, where = "x$lemma==\"UNKNOWN\"", absent = FALSE)

Arguments

parsed

a data object, such as produced by the function iparse

where

a character string containing a logical expression. The analysis list should be named x. E.g., if looking for all analyses with lemma "dog", the argument should be 'x$lemma=="dog"'

absent

a logical, controlling what happens when the queried field is absent: should it be treated as satisfying (TRUE) or not satisfying (FALSE) the query.

Value

a matrix with columns document, word, analysis. Each row contains the number of the document, word, analysis where the search result was found. If no results were found the output is NULL.


rushkin/parseR documentation built on May 17, 2019, 12:52 p.m.