match_geo: Match geo code

Description Usage Arguments Details Value

View source: R/geoparsing.r

Description

If the DTMs used in the compare_documents function contained docvars with geo codes, it can be used to match documents based on their geo code. This can be a single code (e.g., "en") or multiple codes concatenated with a comma (e.g., "en,de") or another seperator defined in the 'sep' argument. A match is TRUE if at least one of the codes in the from document is the same as at least one of the codes in the to document.

Usage

1
match_geo(g, from_var = "geo", to_var = "geo", sep = ",")

Arguments

g

An edgelist, as created with newsflow.compare

from_var

The name of the geo code column in from_dtm

to_var

The name of the geo code column in to_dtm

Details

The function returns a logical vector indicating if each match in the edge list has a geo match.

Value

A logical vector


kasperwelbers/restecode documentation built on Feb. 12, 2020, 11:39 a.m.