Title: | A random sample generator based on The Hitchhiker's Guide to the Galaxy |
---|---|
Description: | Generates random samples containing races described in The Hitchhiker's Guide to the Galaxy. |
Authors: | Bjørn Peare Bartholdy [aut, cre] |
Maintainer: | Bjørn Peare Bartholdy <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-11-04 03:06:41 UTC |
Source: | https://github.com/bbartholdy/hitchr |
Function to create a random sample of Dentrassi
dentrassi(n, stats = stats_index(), ...)
dentrassi(n, stats = stats_index(), ...)
n |
numeric. Number of individuals to create. |
stats |
which stats to include in the sample. See 'stats_index()' for a list of available stats. |
... |
currently serves no function. |
In the current edition of The Guide, there is no entry for the Dentrassi. However, they are described as 'an unruly tribe of gourmands, a wild but pleasant bunch whom the Vogons had recently taken to employ as catering staff on their long-haul fleets (...)'.
– Douglas Adams, Hitchiker's Guide to the Galaxy
A list of dentrassi occupations
dentrassi_occupations
dentrassi_occupations
A data frame with ? rows and 1 variable.
include source...
Function to create a random sample of Golgafrinchans
golgafrinchans(n, stats = stats_index(), ...)
golgafrinchans(n, stats = stats_index(), ...)
n |
numeric. Number of individuals to create. |
stats |
which stats to include in the sample. See 'stats_index()' for a list of available stats. |
... |
currently serves no function. |
The Golgafrinchans generated from this particular function are the middlemen, who were the only remaining Golgafrinchans after the only useful part of the population, the 'doers' and the 'thinkers', got wiped out by a disease contracted from a dirty telephone. They are also believed to be the true ancestors of humans. As such, the only occupations available are Lawyer, Hairdresser, and Telephone Sanitiser.
A list of human occupations
human_occupations
human_occupations
A data frame with ? rows and 1 variable.
include source...
The entry in The Guide for Earth: "Mostly harmless."
humans(n, stats = stats_index(), ...)
humans(n, stats = stats_index(), ...)
n |
numeric. Number of individuals to create. |
stats |
which stats to include in the sample. See 'stats_index()' for a list of available stats. |
... |
currently serves no function. |
Function to create a random sample of humans
Generates a random sample of individuals.
infinite_improbability_drive( n, race = race_index(), na_prob = NULL, quiet = T, symm = T, ... ) iidr(n, race = race_index(), na_prob = NULL, quiet = T, symm = T, ...)
infinite_improbability_drive( n, race = race_index(), na_prob = NULL, quiet = T, symm = T, ... ) iidr(n, race = race_index(), na_prob = NULL, quiet = T, symm = T, ...)
n |
number of individuals to generate. |
race |
which races to include in the generated sample. Default is all. |
na_prob |
Numeric. Proportion of values that should be missing at random. Must be a number between 0 and 1. |
quiet |
if FALSE, will print a statement about the odds of a random event. Default is TRUE. |
symm |
logical. whether the missing values should be inserted symmetrically, i.e., whether each column should contain the same number of NAs. |
... |
can be used to pass 'stats' through to race-specific functions. see example. |
Inserts NAs throughout a data frame at random
missing(x, na_prob = 0.1, cols = seq_along(x), symm = F)
missing(x, na_prob = 0.1, cols = seq_along(x), symm = F)
x |
Data frame or vector. |
na_prob |
the probability of missing values per variable in the data frame. Default is 0.1, i.e. each variable will have 10% NAs. |
cols |
numeric. In which columns to insert NAs. Default is all columns. To leave out the first column, use cols = -1. |
symm |
logical. whether the missing values should be inserted symmetrically, i.e., whether each column should contain the same number of NAs. |
Function is a modified version of 'r_na' and r_na_vector' from the 'wakefield' package. It adds the functionality to add NAs asymmetrically to a data frame, meaning the number of NAs per column will vary.
Returns the original data frame with NAs inserted. The default settings returns a data frame with data missing completely at random.
This function is about the most massively useful thing in this package.
towel(x, rowwise = F, colwise = T, cols = NULL)
towel(x, rowwise = F, colwise = T, cols = NULL)
x |
data frame containing NAs. |
rowwise |
perform rowwise calculation of NAs. |
colwise |
perform colwise calculation of NAs (default). |
cols |
columns on which to perform calculation (default is all columns). |
A list of vogon occupations. The original list was the same as the human occupations, but with all non-administrative jobs removed.
vogon_occupations
vogon_occupations
A data frame with ? rows and 1 variable.
same as humans...
This function creates randomly generated Vogon poetry, thought to be the third worst poetry in the universe, only surpassed by that of the Azgoths of Kria, and Paula Nancy Millstone Jennings of Sussex.
vogon_poetry()
vogon_poetry()
Function to create a random sample of Vogons
vogons(n, stats = stats_index(), ...)
vogons(n, stats = stats_index(), ...)
n |
numeric. Number of individuals to create. |
stats |
which stats to include in the sample. See 'stats_index()' for a list of available stats. |
... |
currently serves no function. |
The Guide on Vogons: "They are one of the most unpleasant races in the Galaxy – not actually evil, but bad-tempered, bureaucratic, officious and callous. They wouldn't even lift a finger to save their own grandmothers from the Ravenous Bugblatter Beast of Traal without orders signed in triplicate, sent in, sent back, queried, lost, found, subjected to public inquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters."
"The best way to get a drink out of a Vogon is to stick your finger down his throat, and the best way to irritate him is to feed his grandmother to the Ravenous Bugblatter Beast of Traal."
"On no account allow a Vogon to read poetry at you."
– Douglas Adams, Hitchiker's Guide to the Galaxy
Most notable about Vogons is that the majority of occupations are administrative in nature; they are born/appear fully educated for said occupation; and the males and females of the species are completely indistinguishable.