[Rd] list.files() reorders files in R CMD INSALL

From: Vadim Ogranovich <vograno_at_evafunds.com>
Date: Thu 23 Jun 2005 - 20:18:35 GMT


Hi,  

The list.files() function seems to order its result vector differently when is run during R CMD INSTALL. Here is an example:  

~% mkdir ~/FOO
~% cd ~/FOO/
~/FOO% touch a A b B
~/FOO% ls

a A b B  

Put foo.R in the vor package. The foo.R just prints the files in ~/FOO: print(list.files("~/FOO"))

Now install the package:
~/FOO% R CMD INSTALL -l ~/R/library/ ~/src/vor/ * Installing *source* package 'vor' ...
** libs
make: `vor.so' is up to date.
** R
** preparing package for lazy loading
[1] "A" "B" "a" "b"  

Note that the files are listed as: [1] "A" "B" "a" "b"  

Now start an R session
> list.files("~/FOO")

[1] "a" "A" "b" "B"

which differs in order from that in R CMD INSTALL.    

> version

         _
platform x86_64-unknown-linux-gnu

arch     x86_64                  
os       linux-gnu               
system   x86_64, linux-gnu       
status                           
major    2                       
minor    0.1                     
year     2004                    
month    11                      
day      15                      
language R                       

Thanks,
Vadim



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Jun 24 06:20:58 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:09 GMT