[Rd] Bug in Sys.which()?
dtenenba at fhcrc.org
Tue Nov 29 00:15:52 CET 2011
On Mon, Nov 28, 2011 at 2:34 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
> On 11-11-28 5:20 PM, Dan Tenenbaum wrote:
>> At a Windows command prompt:
>> C:\>which ls
>> C:\>which perl
>> In R:
>>> Sys.which(c("ls", "perl"))
>> ls perl
>> "c:\\RTOOLS~3\\bin\\ls.exe" ""
>> Is this expected behavior?
> R doesn't necessarily have the same search path as your command prompt.
> (Look at PATH in your command line, and Sys.getenv("PATH") in R, to
> compare.) When I try Sys.which() that with two things known to be on the
> path that R uses, it finds both.
> Duncan Murdoch
>> R Under development (unstable) (2011-10-28 r57459)
>> Platform: i386-pc-mingw32/i386 (32-bit)
>>  LC_COLLATE=English_United States.1252
>>  LC_CTYPE=English_United States.1252
>>  LC_MONETARY=English_United States.1252
>>  LC_NUMERIC=C
>>  LC_TIME=English_United States.1252
>> attached base packages:
>>  stats graphics grDevices utils datasets methods base
>> loaded via a namespace (and not attached):
>>  tools_2.15.0
>> R-devel at r-project.org mailing list
More information about the R-devel