Advent of Code 2020

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.

Factorizing variables in R

There are 5 ways (that I know of) in which we can factorise multiple variables in R. One by one (an option for beginners). Using a for loop. lapply() forcats::fct_relevel() purrr::map() 0.

One sample t-tests

Example 1 Consider 20 first year resident female doctors drawn at random from one area, resting systolic blood pressures measured using an electronic gadget were:

Data Manipulation

Load the packages required Read in the wafanyikazi dataset 1. dplyr 1.1 select() 1.2 filter() 1.3 mutate() 1.3.1: mutate_all() 1.3.2: mutate_at() 1.3.3: mutate_if() 1.4 group_by() and summarise() 1.