alathrop
6/7/2018 - 11:28 PM

matching with Hmisc


  # more robust than %in%
  mz_grid <- mz_grid[(Hmisc::find.matches(mz_grid$StartBearing,
                                          field_bearings,
                                          tol = c_resolution/10))[["matches"]]
                   & (Hmisc::find.matches(mz_grid$EndBearing,
                                          field_bearings,
                                          tol = c_resolution/10))[["matches"]],]