title: Remove all non-alphanumerical values from dataframe in R
body: <p>I'm trying to remove special characters from the rows in my data frame. so keep numbers and alphabets. I have tried this code but it also takes out the alphabet rows. Ultimately trying to remove the special characters</p>
  <pre><code>df[] &lt;- lapply(df, function(x) gsub(&quot;[^-0-9/.]+&quot;, &quot;&quot;, x))
  </code></pre>