Description Usage Arguments Details Value Examples
Validates data format for stv() input. Assumes each row and column
corresponds to a ballot and candidate respectively. See details for the
tests run by this function. If input data is in correct format, returns
string: "All tests passed. Please feel free to run stv() function.".
Otherwise, prints corresponding warning message.
1 |
x |
a |
Checks if input data is in acceptable format for stv(). User must run
this function before calling stv(). Before any calculation, stv()
calls this function and proceeds only if x passes all of the following tests
(run in given order).
If x is a data.frame.
If x has unique column names.
If x has numeric entries.
If x doesn't have any blank column.
If x doesn't have any blank row or a row with non-sequential ranks.
string: "All tests passed. Please feel free to run stv() function." if x
passes all tests. Otherwise, corresponding warning message. NOTE: Some of the
warnings can be fixed using cleanBallots() function. Other issues must be
fixed by the user.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.