Six approaches to rounding numbers in R (CC253)

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 13

  • @mikep8857
    @mikep8857 2 года назад +7

    The janitor package is best known for the clean_names() function but also contains lots of other goodies. In particular, round_half_up() does "elementary school" rounding, and round_to_fraction() rounds to the nearest fraction (e.g. if you want 4.3 to round to 4.25 or any other specified fraction).

    • @Riffomonas
      @Riffomonas  2 года назад +1

      Thanks Mike - that's a great tip!

    • @taiwankyh
      @taiwankyh 2 года назад

      After the message, I recognize the good functions in janitor package

  • @taiwankyh
    @taiwankyh 2 года назад +1

    Amazing, First time to know the problem

  • @PhilippusCesena
    @PhilippusCesena 2 года назад +1

    Thank you, very useful! I did not know the other rounding methods.

    • @Riffomonas
      @Riffomonas  2 года назад

      Glad it was helpful! Thanks for watching

  • @qwerty11111122
    @qwerty11111122 2 года назад +2

    For making plot limits, I found it kinda bothersome that you can't ask signif to also do a ceiling/floor rather than a standard rounding on the last significant digit. I made my own:
    sigfloor

    • @Riffomonas
      @Riffomonas  2 года назад

      Thanks for sharing and watching!

  • @abdullahalmohamad244
    @abdullahalmohamad244 2 года назад

    Thank you very much for all lessons.
    I have dat of monthly morbidities with number of patients for primary health care center and also the medication consumption (aggregated prescription daily) data for the same center and period,
    I am looking for way to test the correlation between medication usage and number of morbidities, then to check if the prescribers are abiding the defined protocols, dosage, duration of therapy and eventually the quality of health care of this center.
    This will provide statistical inference how to optimise the health care quality ( NGO center)

    • @Riffomonas
      @Riffomonas  2 года назад

      Thanks for watching! Be sure to check out the cor.test function

  • @benjaminbulle9199
    @benjaminbulle9199 2 года назад +1

    Its so funny, we have same question at same time. I'm working a similar job but i'm using spatial object and over() to count point in region. Over is a strange fonction but it works fine.

    • @Riffomonas
      @Riffomonas  2 года назад

      Thanks! I'm by no means a spatial data analysis expert 😂