tidytab icon indicating copy to clipboard operation
tidytab copied to clipboard

cumulative percentage > 100%

Open zhizhongpu opened this issue 10 months ago • 2 comments

Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on https://stackoverflow.com/ or https://community.rstudio.com/.

    city │      Freq.     Percent        Cum. 

──────────────────┼─────────────────────────────────── ancud │ 3 0.2 0.2 antofagasta │ 32 1.8 2.0 arauco │ 10 0.6 2.6 arica │ 14 0.8 3.4 aysen │ 2 0.1 3.5 buin │ 1 0.1 3.6 calbuco │ 2 0.1 3.7 carahue │ 3 0.2 3.9 casablanca │ 1 0.1 4.0 castro │ 1 0.1 4.1 cerro navia │ 2 0.1 4.2 chimbarongo │ 3 0.2 4.4 cobquecura │ 1 0.1 4.5 colbun │ 1 0.1 4.6 colchane │ 1 0.1 4.7 collipulli │ 9 0.5 5.2 concon │ 1 0.1 5.3 coyhaique │ 9 0.5 5.8 cunco │ 5 0.3 6.1 curacautin │ 1 0.1 6.2 curanilahue │ 4 0.2 6.4 curarrehue │ 1 0.1 6.5 dalcahue │ 2 0.1 6.6 el bosque │ 9 0.5 7.1 el quisco │ 1 0.1 7.2 ercilla │ 4 0.2 7.4 florida │ 15 0.8 8.2 futrono │ 4 0.2 8.4 galvarino │ 9 0.5 8.9 higgins │ 23 1.3 10.2 huasco │ 1 0.1 10.3 huechuraba │ 4 0.2 10.5 la ligua │ 1 0.1 10.6 la union │ 2 0.1 10.7 las condes │ 2 0.1 10.8 lautaro │ 10 0.6 11.4 lebu │ 6 0.3 11.7 limache │ 3 0.2 11.9 llanquihue │ 1 0.1 12.0 lo espejo │ 1 0.1 12.1 loncoche │ 1 0.1 12.2 los andes │ 1 0.1 12.3 los lagos │ 5 0.3 12.6 los vilos │ 1 0.1 12.7 lota │ 2 0.1 12.8 macul │ 2 0.1 12.9 marchihue │ 1 0.1 13.0 maule │ 3 0.2 13.2 mejillones │ 1 0.1 13.3 melipilla │ 1 0.1 13.4 mostazal │ 1 0.1 13.5 nancagua │ 1 0.1 13.6 nueva imperial │ 1 0.1 13.7 nunoa │ 5 0.3 14.0 paillaco │ 1 0.1 14.1 panguipulli │ 1 0.1 14.2 penalolen │ 1 0.1 14.3 petorca │ 3 0.2 14.5 pichidegua │ 1 0.1 14.6 pichilemu │ 3 0.2 14.8 pozo almonte │ 2 0.1 14.9 providencia │ 7 0.4 15.3 pudahuel │ 5 0.3 15.6 puente alto │ 7 0.4 16.0 puerto octay │ 1 0.1 16.1 puerto varas │ 1 0.1 16.2 purranque │ 2 0.1 16.3 quellon │ 1 0.1 16.4 quilicura │ 5 0.3 16.7 renca │ 1 0.1 16.8 rio bueno │ 3 0.2 17.0 rio negro │ 6 0.3 17.3 san antonio │ 3 0.2 17.5 san carlos │ 2 0.1 17.6 san gregorio │ 1 0.1 17.7 san javier │ 1 0.1 17.8 san joaquin │ 2 0.1 17.9 santa cruz │ 1 0.1 18.0 santiago │ 1488 82.0 100.0 sierra gorda │ 1 0.1 100.1 taltal │ 1 0.1 100.2 teodoro schmidt │ 1 0.1 100.3 tiltil │ 2 0.1 100.4 tirua │ 1 0.1 100.5 tocopilla │ 2 0.1 100.6 tome │ 1 0.1 100.7 tucapel │ 3 0.2 100.9 valdivia │ 6 0.3 101.2 vallenar │ 1 0.1 101.3 victoria │ 2 0.1 101.4 vilcun │ 1 0.1 101.5 villarrica │ 3 0.2 101.7 vitacura │ 4 0.2 101.9 yumbel │ 1 0.1 102.0 yungay │ 4 0.2 100.0 ──────────────────┼─────────────────────────────────── Total │ 1814 100.0

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex. i'm using a proprietary dataset, but i think the general problem holds whenever there're a large number of categories with relatively small percentage of the total For more advice on how to write a great issue, see https://code-review.tidyverse.org/issues/.

Brief description of the problem

# insert reprex here

zhizhongpu avatar Apr 16 '24 00:04 zhizhongpu