Try this: sapply(c("csv$", "pdf$"), function(x)length(dir(path=Dir, pattern = x)))
On Mon, Aug 18, 2008 at 4:59 AM, Kurapati, Ravichandra (Ravichandra) <[EMAIL PROTECTED]> wrote: >> Let's say, > >> > >> Dir<-"/var/www/html/celnet/users/cxadmin/FlowDuration_DataVolume/fld_0 > >> 1_ > >> 08_18_08" > >> > >> There will be pdf and/or csv files. > >> I want to know how many *.pdf and/or csv files are there in that > directory. > >> > >> How can I get using R commands. > >> > > > > > > Thanks > > K.Ravichandra > > > > > > > [[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 ______________________________________________ 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.