Learn R Programming

sos (version 2.0-0)

hits: matches attribute of a findFn object

Description

Returns the matches attribute of a findFn object. For the output of findFn, this is the number of matches for the search term. For a findFn object returned by unionFindFn or intersectFindFn, this is a numeric vector if the matches attributes of the arguments to unionFindFn or intersectFindFn.

Usage

matches(x)
hits(x)

Arguments

x

object of class findFn.

Value

a list with components nrows and matches

Details

nrow(x) attr(x, 'matches')

See Also

findFn unionFindFn intersectFindFn

Examples

Run this code
# NOT RUN {
des1 <- findFn('differential equations', 1)

des1. <- matches(des1)
des. <- list(nrow=nrow(des1), matches=attr(des1, 'matches'))
# }
# NOT RUN {
all.equal(des1., des.)
# }

Run the code above in your browser using DataLab