jelenavicic / myrepo

0 stars 0 forks source link

Legacy Code - Measuring Landscape of Civil War #1

Open jelenavicic opened 2 years ago

jelenavicic commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

There is legacy code in the project in janitor package that prevented smooth replication of the study.

To Reproduce Steps to reproduce the behavior:

  1. Go to '01 Prep Events Counts' and scroll down to 'Type of Event'. Scroll to third chunk.
  2. Run the third chunk. The bug appears when adorn_crosstab is used.
  3. See error:
   `adorn_crosstab()` was deprecated in janitor 2.0.0 and is now defunct.
   Please use `tabyl()` instead.
   See the adorn_* functions for formatting a tabyl: https://cran.r-project.org/web/packages/janitor/vignettes/tabyls.html
  1. The same error appears throughout the replication code for '01 Prep Event Counts'.

Expected behavior A clear and concise description of what you expected to happen.

adorn_crosstab is used to add presentation formatting to a cross-tabulation table. In this first case where the deprecated code appears, it seems like it's supposed to count frequency, show the percentages for the event data, and have only 1 digit after the percentage point output.

Screenshots If applicable, add screenshots to help explain your problem. NA Desktop (please complete the following information):

Additional context Add any other context about the problem here.

jelenavicic commented 2 years ago

Hi @rexdouglass, please take a look!