Let’s imagine you would like to construct a simple test based on the condition setdiff(input, 1:9).
How can I construct an
if isnotempty(setdiff(input, 1:9)) stop ("not valid")
statement which stops execution when input is c(3, 12) but continues when input is c(2,5,7) say?
Many thanks,
Bertie
You could use
?length: