I have these two object:
In the first object I want to find the position where this condition is satisfied:
"sig != mlag(sig) & sig != 0"
When I have these positions I want to substitute value in the xts object (zero for example) in the same position where the condition in sig
was satisfied
I need to understand the correct way to do these. Thank you