Skip to contents

Takes as input data produced by gallicagram_cooccur or gallicagram_cooccur_lexicon and produces a graph describing the evolution of the proportion of co-occurrences in this data set.

Usage

gallicagraph_cooccur(data, color = NULL)

Arguments

data

A data frame produced by the gallicagram_cooccur or gallicagram_cooccur_lexicon functions (or several of such data frames bound by rows).

color

A variable to set colors for the graph

Value

A graph describing the evolution of the proportion of co-occurrences of two keywords in one or several corpora.

Details

This function can also be combined with faceting by adding for instance + facet_wrap(~ keyword) after calling the function.

Examples

  gallicagram_cooccur("président", "ancien") |>
    gallicagraph_cooccur()


  gallicagram_cooccur("président", "ancien") |>
    rbind(gallicagram_cooccur("président", "république")) |>
    gallicagraph_cooccur(color = keyword)


  gallicagram_cooccur("président", "ancien") |>
    rbind(gallicagram_cooccur("président", "république")) |>
    gallicagraph_cooccur() +
    ggplot2::facet_wrap(~ keyword)