Construct a loop based on multiple conditions in a column R
问题 I have a df attached and I would like to create a loop that would apply a specific sequence based on conditions in column "x9" . I would like to be able to set the sequence myself so I can try different sequences for this data frame, I will explain more below. I have a df of losses and wins for an algorithm. On the first instance of a win I want to take the value in "x9" and divide it by the sequence value. I want to keep iterating through the sequence values until a loss is achieved. Once a