Reputation: 33
I have a 1 X 1000 vector = x of numbers from 1 to 1000, and a certain function = y into which I plug in these numbers, resulting in a 1 x 1000 vector of results. I would like for R to return the value of y at which the function is greater than a certain number. How can this be done?
Upvotes: 0
Views: 154
Reputation: 3525
If you call the result from function y res
res_over_certain_number <- res[res > certain_number]
Upvotes: 1