0

I have a dataframe which i need to check if it has negative values, if yes then i want to get out of a loop inside which i'll be doing other manipulations. I searched a lot but could only get answers which tried to manipulate the original dataframe or to create a new dataframe removing the negative values. I just want to include this check in an if condition and not a loop.

Thanks in advance

Arun kumar mahesh
  • 2,289
  • 2
  • 14
  • 22
b4477
  • 1
  • 2
  • 1
    Welcome to StackOverflow! Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – zx8754 Nov 15 '16 at 12:31
  • 1
    Please provide a data example by giving the output of `dput(head(yourdata))` and explain an example manipulation you want to perform incase of a negative value. – LAP Nov 15 '16 at 12:34
  • Something along the lines: `do.call(rbind, apply( myDFlist, subset))` tell us more about the data and "manipulations" then we can help you better. – zx8754 Nov 15 '16 at 12:38
  • post a specific example with sample data and at least some amount of research effort on your own part - if you've tried to achieve your objective by writing some code, share that . Your question is too broad right now for anyone to be able to help you out. Based on what you said above - you might be looking for `stopifnot` or `tryCatch` – vagabond Nov 15 '16 at 13:04

0 Answers0