get_expected_mean | R Documentation |
data
based on the number of digits in each left-aligned digit placeObtains expected mean conforming to Benford's Law from input data
based on the number of digits in each left-aligned digit place
get_expected_mean(
digitdata,
data,
Benford_mean,
max_length,
num_digits,
omit_05
)
digitdata |
A object of class |
data |
A dataframe of right-aligned digits table, preferably from |
Benford_mean |
A table for Benford mean in each digit place after removing 0 and/or 5 if desired, preferably from |
max_length |
The length of the longest numbers considered. Defaulted to 8. |
num_digits |
The total number of digits aligned from the right to be analyzed. Defaulted to 5, meaning analyzing digit place 1s to 10ks. |
omit_05 |
Whether to omit 0 or both 0 and 5. If omit both 0 and 5, pass in c(0,5) or c(5,0); if omit only 0 pass in 0 or c(0); if omit neither, pass in NA. Default to NA. |
A list of 4 items:
expected_mean
: A table of expected mean for the dataset data
freq_table
: The number of left-aligned digit place numbers in each right-aligned digit position in data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.