is_freq is a function that checks whether its single argument
is a frequency (i.e., a positive numeric integer value).
A single (typically numeric) argument.
A Boolean value:
freq is a frequency (positive integer),
num contains basic numeric variables;
init_num initializes basic numeric variables;
prob contains current probability information;
comp_prob computes current probability information;
freq contains current frequency information;
comp_freq computes current frequency information;
is_valid_prob_set verifies the validity of probability inputs;
as_pc displays a probability as a percentage;
as_pb displays a percentage as probability
1 2 3 4 5 6 7 8 9 10 11
# ways to succeed: is_freq(2) # => TRUE, but does NOT return the frequency 2. is_freq(1:3) # => TRUE (for vector) # ways to fail: is_freq(-1) # => FALSE + warning (negative values) is_freq(1:-1) # => FALSE (for vector) + warning (negative values) is_freq(c(1, 1.5, 2)) # => FALSE (for vector) + warning (non-integer values) ## Note that: is.integer(2) # => FALSE!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.