Skip to contents

Clean Kindle file

Usage

kindle_clean(
  data,
  distinct = TRUE,
  drop_na = TRUE,
  new_line = TRUE,
  title = NULL
)

Arguments

data

The data read from kindle_read().

distinct

Logical. If TRUE, the last record with the same begin value will be retained; if FALSE, no records will be deleted.

drop_na

Logical. If TRUE, drop rows where text column is NA; if FALSE, no records will be deleted.

new_line

Logical. If TRUE, will be replaced by \n which can create a new line.

title

String. Provide the title of the data you want to write out, with support for regular expressions. If NULL, all of records will be wrote out.

Value

A tidy data.

Examples

if (FALSE) {
text <- kindle_read("tests/testthat/My-Clippings.txt")
kindle_clean(text)
}