| Title: | Perform Random Experiments |
|---|---|
| Description: | Enables user to perform the following: 1. Roll 'n' number of die/dice (roll()). 2. Toss 'n' number of coin(s) (toss()). 3. Play the game of Rock, Paper, Scissors. 4. Choose 'n' number of card(s) from a pack of 52 playing cards (Joker optional). |
| Authors: | Prithul Chaturvedi <[email protected]> |
| Maintainer: | Prithul Chaturvedi <[email protected]> |
| License: | GPL |
| Version: | 1.0.2 |
| Built: | 2026-05-26 09:29:31 UTC |
| Source: | https://github.com/cran/prithulib |
An event of choosing a card from a pack of 52 cards (Joker optional)
cards(n, joker = FALSE)cards(n, joker = FALSE)
n |
is the number of cards to be chosen (default 1) |
joker |
TRUE includes the Joker card in the deck (default FALSE) |
The chosen card(s)
Prithul Chaturvedi
cards(3, joker = TRUE)cards(3, joker = TRUE)
Rolls a die for 'n' number of times
roll(n = 1, size = 6)roll(n = 1, size = 6)
n |
is the number of times to roll the die (default 1) |
size |
is the number of faces on the die (default 6) |
Outcome(s) of rolling of the die
Prithul Chaturvedi
roll(2,10)roll(2,10)
Play Rock, Paper, Scissors
rpc()rpc()
A move
Prithul Chaturvedi
rpc()rpc()
Tosses a coin for 'n' number of times
toss(n = 1)toss(n = 1)
n |
is the number of times the coin is tossed (default 1) |
Outcome(s) of tossing the coin
Prithul Chaturvedi
toss(3)toss(3)