title: R - find/replace line breaks using regex
body: <p>I'm trying to clean a bunch of .txt files in a folder using regex. I can't seem to get R to find line breaks.</p>
  
  <p>This is the code I'm using. It works for character substitution, but not for line breaks.</p>
  
  <pre><code>gsub_dir(dir = "folder_name", pattern = "\\n", replacement = "#")
  </code></pre>
  
  <p>I've also tried \r and various other permutations. Using a plain text editor I find all the line breaks with \n.</p>