return function

I want to include in a return function, an additional filter:

example:
I close the function with

return(mp_fmp[delta_fr != 0])

however, I would like to add an additional filter, such as:
return(mp_fmp[delta_fr != 0 & f_vol.t1 > 0])
apparently there is sth wrong with the new (condition= & f_vol.t1 > 0) additional filter, but I can not figure it out from the syntaxis.

Could you please help me?
Many thanks and regards
Renzo

Welcome to the community!

We don't have enough information to help you.

Can you please provide a REPRoducible EXample of your problem? It provides more specifics of your problem, and it helps others to understand what problem you are facing.

In case you don't know how to make a reprex, here's a great link:

Also, please include a sample dataset and the errors you're facing while trying return(mp_fmp[delta_fr != 0 & f_vol.t1 > 0]).

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.