Description Usage Arguments Details Value Author(s)
Takes as inputs a dataframe representing a 2d matrix, and target marings for cols and rows. Returns a table reweighted so its sums fit margins.
1 2 |
df |
the dataframe to reweight |
margins_cols |
a vector containing the target marginals for cols |
margins_rows |
a vector containing the target marginals for rows |
max.iterations |
the maximum iterations before stopping (1000 by default) |
precision |
the target precision, will stop once reached (defaults to 1e-6) |
verbose |
displays more messages if TRUE (FALSE by default) |
Either falls back to a local implementation ipf.2d.stackoverflow, or to an
higher quality one from the mipfp package if it is installed.
the dataframe reweighted
Samuel Thiriot <samuel.thiriot@res-ear.ch>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.