Proportions of winning


I am new to using R and need a bit of advice.

I need to show proportions of winning and I was wondering how to do this. The general gist of this is if 1 person gets a higher number between 1-5, then their friend (Person 2), I need to be able to show who has won.

Can I do this using the if else clause?

Further, if I'm going to then expand this to 4 people, how can I do this?

So far I have:
Friend0_Card <- c (1:5)
Friend1_Card <- c (1:5)
sample(Friend0_Card, 5)
sample(Friend1_Card, 5)

but how can I show who has the highest number per round?


Its probably convenient to keep related information together in a data.frame, I suggest you incorporate that.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.