Is there an easy way to check whether a variable is within +/- 10% range of another variable in R?
Say, if I have a variable 'A', whether its in +/- 10% range of variable 'B' and if so, create another variable 'C' to say whether it is or not? Is there a function that is able to do that? eventual outcome: A B C 67 76 no 24 23 yes 40 45 yes 10 12 yes 70 72 yes 101 90 no 9 12 no ______________________________________________ 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.