I understand that you can sample elements from a list using:
list1 <- list(x, y)
A <- sample(list1, 1)
If 'A' is x, how do I store the value of y in 'B', without using an if loop?
Aucun commentaire:
Enregistrer un commentaire