Get startedGet started for free

Comparing pairs

Now that you've generated the pairs of restaurants, it's time to compare them. You can easily customize how you perform your comparisons using the by and default_comparator arguments. There's no right answer as to what each should be set to, so in this exercise, you'll try a couple options out.

dplyr and reclin are loaded and zagat and fodors are available.

This exercise is part of the course

Cleaning Data in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Generate pairs
pair_blocking(zagat, fodors, blocking_var = "city") %>%
  # Compare pairs by name using lcs()
  ___(by = ___,
      default_comparator = ___)
Edit and Run Code