Section 18 t.test


18.1 Subset and summarise data

  • Subset the BP data as a new data.frame pBP with only two Groups A & B

  • Obtain the mean and sd of SBP for Groups A & B

  • Create appropriate plots to compare the data on SBP between Groups A & B


18.2 t.test

  • Perform the t.test to compare if the mean difference for SBP between Group A and B is significantly different.

  • Examine the R object of the t.test outputs.

  • Write your own function to conduct the t.test.