I have a function(x) that includes an if statement in r where the output of the inserted value is either TRUE or FALSE. I now want to make another function(y) which will display (y) number of true values. For example if I was testing in the first function whether a number is divisible by three, which would be true. Then in the next function, if I input 3, I want to program the function so it displays the first three true numbers, so in this case 3, 6, 9.
Aucun commentaire:
Enregistrer un commentaire