inst/extdata/tokenized.R

# Create a dataset for the `calc_type_metrics` function

set.seed(123) # for reproducibility

# Create a dataset with 100 rows and 2 columns The first column contains the
# type (A, B, C, D, E) The second column contains the document (doc1, doc2,
# doc3)

types_data <- data.frame(
  letter = rep(c("A", "B", "C", "D", "E"), each = 20),
  doc_id = sample(c(
    "doc1",
    "doc2", "doc3"
  ), 100, replace = TRUE)
)

# Save the dataset as an RDS file
saveRDS(types_data, "inst/extdata/types_data.rds")

Try the qtkit package in your browser

Any scripts or data that you put into this service are public.

qtkit documentation built on April 4, 2025, 4:47 a.m.