Simulation for Power Analysis by Nick Huntington-Klein:
Excerpt from site: In this document we’ll talk about power analysis in general and how it’s done, and then we’ll go into how to perform a power analysis using simulation in R, making use of tools from the tidyverse.