Using `cheatR`"

  collapse = TRUE,
  comment = "#>"
  # fig.path = "/man/figures/"


Create a list of files:

my_files <- list.files(path = '../man/files/', pattern = '.doc', full.names = TRUE)

The first 3 documents are different drafts of the same paper, so we would expect them to be similar to each other. The last document is a draft of a different paper, so it should be dissimilar to the first 3. All files are about 45K words long.

Now we can use cheatR to find duplicates.

The only function, catch_em, takes the following input arguments:

results <- catch_em(flist = my_files,
                    n_grams = 10, time_lim = 1) # defaults

The resulting list contains a matrix with the similarity values between each pair of documents:


You can also plot the relational graph if you'd like to get a more clear picture of who copied from who.

plot(results, weight_range = c(0.7, 1), remove_lonely = FALSE)

Try the cheatR package in your browser

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

cheatR documentation built on July 1, 2020, 9:16 p.m.