Description Usage Arguments Details Value Author(s) Examples
View source: R/relative_freq.R
A function to comoute relative frequency efficiently
1 | relative_freq(bin_idx = 1L, h_breaks = 20L, obs)
|
bin_idx |
Integer, bin number of the histogram |
h_breaks |
number of breaks for the histogram |
obs |
A numeric vector of observations |
This function compute relative frequency effectively using tabulate
rf
A numerical vector of the relative frequencies
rf_one
A numerical value of the relative frequency
of a particular bin
Mohamad S. Hasan, mshasan@uga.edu
1 2 3 | # generating data (known in practice)
X = runif(1000, min = 0, max = 2) # covariate
r_freq <- relative_freq(bin_idx = 1, h_breaks = 20, obs = X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.