csv_to_serial: Convert a CSV into a serial mapping suitable for Contextractr

Description Usage Arguments Value Examples

View source: R/IO.R

Description

Given a csv, with one row per keyword + approx.match specifier, grouped according to "title" (Single value for title may span multiple keywords) transform this to something digestable by contextractr.

Usage

1

Arguments

df

the input dataframe, more or less a raw csv

Value

the input df, serialized.

Examples

1
2
3
4
5
6
7
if (requireNamespace("readr", quietly = TRUE)){
  in_csv <- readr::read_csv("../../tests/testthat/csv_specifier.csv")
  print(in_csv)

  out <- in_csv %>% csv_to_serial()
  if (requireNamespace("utils", quietly = TRUE)) utils::str(out)
}

mstr3336/contextractr documentation built on Aug. 10, 2020, 12:46 a.m.