[R] Where the data file is stored?

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu Aug 12 18:00:38 CEST 2010


On Thu, Aug 12, 2010 at 4:51 PM, Stephen Liu <satimis at yahoo.com> wrote:
> Hi Barry,
>
>
> Following 2 commands are useful to me;
>> row.names(subset(file.info(list.files(getwd(),full.name=TRUE)),isdir))
> showing directories.
>
>> row.names(subset(file.info(list.files(getwd(),full.name=TRUE)),!isdir))
> showing files
>
>
> What is "!" for?  TIA

 It means 'not'. So TRUE becomes FALSE and FALSE becomes TRUE. And NA stays NA.

 Use it when you need to invert logical values.

Barry



More information about the R-help mailing list