title: Rtools not being detected by R
body: <p><strong>Update:</strong></p>
  
  <p>I've written a brief walkthrough guide to <a href="http://thecoatlessprofessor.com/programming/rcpp/install-rtools-for-rcpp/" rel="noreferrer">installing Rtools on windows</a>.</p>
  
  <p><strong>Original:</strong></p>
  
  <p>I am trying to build an R package using RStudio on Windows 7. When I attempt to build the package via RStudio's Build panel I receive:</p>
  
  <pre><code>WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
  
  http://cran.rstudio.com/bin/windows/Rtools/
  </code></pre>
  
  <p>Loading <code>library(devtools)</code> and running <code>find_rtools(T)</code> gives:</p>
  
  <pre><code>Scanning path...
  ls : F:\Rtools\bin\ls.exe 
  Scanning registry...
  Found F:/Rtools for 3.1 
  VERSION.txt
  Rtools version 3.1.0.1936 
  [1] TRUE
  </code></pre>
  
  <p>The Path variable is set as:</p>
  
  <pre><code>F:\Rtools\bin;F:\Rtools\gcc-4.6.3\bin;F:\Rtools\perl\bin;F:\Rtools\MinGW\bin;F:\Program Files\R\R-3.0.2\bin\x64;F:\Program Files (x86)\HTML Help Workshop;F:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Microsoft Network Monitor 3\;F:\Program Files (x86)\QuickTime\QTSystem\
  </code></pre>
  
  <p>I've also restarted several times, yet the error persists. I'm a bit confused as to why this is occurring.</p>
  
  <p>Output when R access system variable Path:</p>
  
  <pre><code>&gt; Sys.getenv()['PATH']
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   PATH 
  "F:\\Program Files\\R\\R-3.0.2\\bin\\x64;F:\\Rtools\\bin;F:\\Rtools\\gcc-4.6.3\\bin;F:\\Rtools\\perl\\bin;F:\\Rtools\\MinGW\\bin;F:\\Program Files\\R\\R-3.0.2\\bin\\x64;F:\\Program Files (x86)\\HTML Help Workshop;F:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Windows Live\\Shared;C:\\Program Files\\Microsoft Network Monitor 3\\;F:\\Program Files (x86)\\QuickTime\\QTSystem\\" 
  </code></pre>
  
  <p>The R version I am using is: R version 3.0.2 (2013-09-25) -- "Frisbee Sailing."</p>
  
  <p>The Rstudio Version I am using is: 0.97.551. When I check for updates, I'm told that this is the latest patch.</p>
  
  <pre><code>&gt; Sys.which("ls.exe")
                     ls.exe 
  "F:\\Rtools\\bin\\ls.exe" 
  &gt; Sys.which("gcc.exe")
  gcc.exe 
       "" 
  </code></pre>