On 11-05-2012, at 20:18, Jun Shen wrote: > Dear list, > > I want to show all the objects starting with "d" and ending with a digit. > How do I specify these conditions in the pattern argument > > I can do one condition but not two > > ls(pattern='^d') > ls(pattern='[[:digit:]]$') > > are working. > > But, > > ls(pattern='^d'&'[[:digit:]]$') is not working.
'^d.*[[:digit:]]$' starting with a 'd', followed by zero or more of anything and ending with a digit. Berend ______________________________________________ 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.