Help with the R codes

Welcome.

  1. Change the title so that it describes your problem.
  2. Provide a reproducible example.