Re: [R] selecting and excluding files through a pattern

From: Jorge Ivan Velez <jorgeivanvelez_at_gmail.com>
Date: Thu, 10 Jun 2010 11:30:12 -0400

Hi Maura,

Try list.files(pattern = 'csv')

HTH,
Jorge

On Thu, Jun 10, 2010 at 11:24 AM, <> wrote:

> I have the following files list:
>
> > list.files()
> [1] "Prostate-Cancer_cvs_Dir"
> [2] "Prostate_Cancer-miRNAs&Genes.Pathway.xml"
> [3] "Prostate_Cancer_Pathways-miRNAs-GeneTargets-Dir"
> [4] "Prostate_Cancer_Pathways-miRNAs-GeneTargets-Dir.zip"
> [5] "Prostate-miRNAs.OrganTargets.txt"
> [6] "Prostate_Organ-miRNAs-GenesTargets-Dir"
> [7] "Prostate_Organ-miRNAs-GenesTargets-Dir.zip"
> [8] "Prostate_Organ-miRNAs-Targets.xml"
> [9] "Prostatic_Neoplasm-miRNAs.DiseaseTargets.csv-KO"
> [10] "Prostatic_Neoplasm-miRNAs.DiseaseTargets.txt"
> [11] "Prostatic_Neoplasms-miRNAs-GeneTargets-Dir"
> [12] "Prostatic_Neoplasms-miRNAs-GeneTargets-Dir.zip"
> [13] "Prostatic_Neoplasms-miRNAs.xml"
>
> I'd like to find the pattern expression which selects only the directories
> excluding the one whose
> pathname contains "csv".
> I tried:
> > list.files(pattern="Prostate*Dir")
> But I do not know how to exclude the names containing the string "csv" at
> the same time.
>
> Thank you for any help,
> Maura
>
>
>
>
> ;
>
>
> tutti i telefonini TIM!
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 10 Jun 2010 - 15:35:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jun 2010 - 22:40:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive