title: Join separator in R fread shell command
body: <p>I have two .txt files that I want to join using the R data.table <em>fread</em> function's shell command feature as a pre-processing step before importing into R. The two files are:</p>
  <pre><code>foods.txt:
  
  ID|FOOD
  100000853384|Cheese
  100003735682|Potato
  100006367485|Apple
  100007267644|Beef
  
  food_types.txt:
  
  ID|TYPE
  100000853384|Fat
  100003735682|Carbohydrate
  100006367485|Fruit
  100007267644|Protein
  </code></pre>
  <p>I tried this code</p>
  <pre><code>library(data.table)
  foods &lt;- fread(cmd = paste(&quot;join -t '|' food_types.txt foods.txt&quot;))
  </code></pre>
  <p>But it returns an error saying</p>
  <pre><code>''' is not recognized as an internal or external command,
  operable program or batch file.
  </code></pre>
  <p>However, the join works properly if I change the delimiter to a comma and use</p>
  <pre><code>foods &lt;- fread(cmd = paste(&quot;join -t ',' food_types.txt foods.txt&quot;))
  </code></pre>
  <p>How can I get the join to work with the pipe delimiter? I am using R version 4.1.3 on Windows 10 Pro.</p>