I am trying to learn about permutations and combinations in rstudio
I have an idea of what am trying to achieve. Considering 13 sports games with n = 13, where there are r = 3 possible outcome HW, D, AW.
R code
s <- c("HW", "D", "AW")
permutation(n = 13, r = 3,v=s, repeats.allowed = F ))
I get an error;
Error: unexpected ')' in "permutations(n=13,r=3,v=s,repeats.allowed=F ))"
v is either non-atomic or too short
I want to get the combinations, but most importantly, i want to list the possible combinations in the data set.
I am new to programming, i will appreciate your help on this problem.