printRank: Print The Ranking Result

Description Usage Arguments Details Value

Description

Prettify and print the ranking result

Usage

1
printRank(data, header_cn = TRUE)

Arguments

data

the input ranking data, returned by uwRanking

header_cn

logical, if TRUE, default, the returned data.frame will have a Chinese header

Details

This function prettify the ranking result returned by uwRanking. First of all, the data structure will be checked, if the warning message occurs, make sure the data is returned by uwRanking function. Then, the numeric columns are cut to 2 digits to the right of decimal. And the percentage figure is multiplied 100 and pasted " names are justified with full space, i.e., if the longest underwriter name is 5 chars, then the names with 4 chars will be added one full space to the right side. The column names can be set to Chinese with the parameter.

Value

A prettified data.frame which is exactly the same as input data, however friendlier to be viewed.


baixueyuan/pryrk documentation built on May 11, 2019, 5:26 p.m.