# The normal way for creating a comparator would be to call the generic
# factory method verifyr2::create_comparator that will automatically create
# the correct comparator instance based on the file types.
file1 <- 'my_file1.rtf'
file2 <- 'my_file2.rtf'
comparator <- verifyr2::create_comparator(file1, file2)
# If needed, an explicit comparator can be created as well.
file1 <- 'my_file1.rtf'
file2 <- 'my_file2.rft'
comparator <- RtfFileComparator$new(file1, file2)
Run the code above in your browser using DataLab