r - Missing value when using while loop -
i apologize in advance simple question, have not been able find solution while. trying find least common multiple of f0 , f1. here code:
f0 = 200 f1 = 300 = f0 b = f1 r = 0 while (a!=b) { r = %% b = b b = r }
from this, get:
error in while (a != b) { : missing value true/false needed
because after second iteration r = nan
100 = 300 %% 200 0 = 200 %% 100 nan = 100 %% 0
Comments
Post a Comment