?any

For example,

> X <- matrix(1:9,nrow=3)
> X
     [,1] [,2] [,3]
[1,]    1    4    7
[2,]    2    5    8
[3,]    3    6    9
> any(X==5)
[1] TRUE
> any(X==10)
[1] FALSE


On 10/1/07, Svempa <fempa@yahoo.com> wrote:
>
>
> Thank you, though one small problem remains. How do I define the criteria
> so
> that it searches through every value in the matrices? As for now it only
> looks at the first [1,1] value of the matrices.
>
>
>
>
> jholtman wrote:
> >
> > Read the files in, select those that meet the criteria and store them in
> a
> > list
> >
> > match.list <- list()
> > for (i in list.files(pattern="some pattern")){
> >     x.in <- read.table(i)
> >     if (your match criteria) match.list[[i]] <- x.in
> > }
> >
> > On 9/28/07, Svempa <fempa@yahoo.com> wrote:
> >>
> >> I have a large number of textfiles, and one matix in every texfile. I
> now
> >> want to find an easy way to select those textfiles that contain at
> least
> >> one
> >> value over a certain limit, and collect those matrices in a vector or
> >> something alike. How do I do that?
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/File-selection-by-condition-tf4534428.html#a12940278
> >> Sent from the R help mailing list archive at Nabble.com.
> >>
> >> ______________________________________________
> >> 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.
> >>
> >
> >
> > --
> > Jim Holtman
> > Cincinnati, OH
> > +1 513 646 9390
> >
> > What is the problem you are trying to solve?
> >
> > ______________________________________________
> > 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.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/File-selection-by-condition-tf4534428.html#a12976300
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]

