Sent from my phone. Please excuse my brevity.
On June 20, 2017 12:44:13 AM PDT, Wolfgang K <mails00000 at gmail.com> wrote:
>Hello,
>
>I am trying to implement the following formula using for loops and
>vectors.
>I am sure you can use some fancy R code to solve this but I would like
>to
>keep it simple and stick to for and vector/array if that is possible.
>
>TP = 200;
>RL = 50;
>TPR1 = TP - RL;
>TPR2 = TP + RL;
>PPO = 0;
>
>LSS = 0.1;
>
>counter = 1;
>
>for(i in res) {
>
> # Even
> if(counter %% 2 == 1) {
> ls = abs((sum(LSS)* TP)) / (TPR1 - PPO);
> LSS = c(LSS,ls);
>
> }
>
> # Odd
> if(counter %% 2 == 0) {
>
> ls = abs((sum(LSS)* TPR2)) / (TP - PPO);
> LSS = c(LSS,ls);
>
> }
>}