subscript out of bounds in r for loops :  
In my script, it is possible to get d [[x]] "empty". I tried to do it with esle, but it does not go out.

  how to write esle so that it can give a result of checking zero?

     for (x in 1:licznik3) 
              {
                if(a[[x]] > d[[x]]) 
                {
                  out3[[x]] <- wspolne3[[x]]
                }
                else (a[[x]] < d[[x]]) 
                {
                  out3[[x]] <- NA
                
                }
              }

variables:

    > a
     [1] 0.1
    > d
    numeric(0)

Error in d[[x]] : subscript out of bounds
