The warning is telling you that dplyr::filter() is masking stats::filter(). If you want to use the dplyr function, you can just call filter() directly. However, if you want to use the latter, you'll have to be explicit about the package by typing stats::filter().