(test_var <- 1) %if% (1:7 > 3)
test_var
(test_var <- 2) %if% (1:7 <= 3)
test_var
(test_var <- 100*test_var) %if% (1:7%%2==0)
test_var
# This creates a warning about non-matching lengths.
(test_var <- 500:501) %if% (1:7 <= 3)
test_var
(test_var <- 501:503) %if% (1:7 <= 3)
test_var
(test_var <- 401:407) %if% (1:7 <= 3)
test_var
Run the code above in your browser using DataLab