title: How can I use lapply, sapply or apply to filter a data frame in R?
body: <p>I am trying to remove all field that does not contain 10 digit numbers and those that have 10 zeros, I want to achieve this with the lapply or sapply or apply function. my code below does not work:</p>
  <pre><code>lapply(df, function(x) filter(x %like% &quot;^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]&quot; | !x %in% &quot;0000000000&quot;))
  </code></pre>