Try this: DF[rowSums(DF < 0) == 0,]
On Tue, Nov 24, 2009 at 5:58 PM, Mark Na <mtb...@gmail.com> wrote: > Dear R-helpers, > > I have a dataframe that should not contain any negative values, but it does. > I wish to print the rows from my dataframe that contain a negative value in > any column. I've tried this: > >> dataframe[dataframe<0,] > > but it just returns a row of NAs. > > I would very much appreciate any help with this you could provide. > > Thanks, Mark > > [[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.