patt <- ".*Prostate.*cvs.*" dir(pattern = patt) On Thu, Jun 10, 2010 at 7:07 PM, <mau...@alice.it> wrote:
> Actually this pattern will select the files whose name contains "csv". > Whereas I'd like to exscude them. > Maura > > -----Messaggio originale----- > Da: Jorge Ivan Velez [mailto:jorgeivanve...@gmail.com] > Inviato: gio 10/06/2010 17.30 > A: mau...@alice.it > Cc: r-h...@stat.math.ethz.ch > Oggetto: Re: [R] selecting and excluding files through a pattern > > 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@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. > > > > > > > tutti i telefonini TIM! > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@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.