nestedCC implements nested case-control sampling from cohort data, mostly for teaching purposes.
You can install the development version of nestedCC from Github with:
devtools::install_github("nestedCC")
This is a basic example which shows you how to solve a common problem:
library(nestedCC)
example(nestedCC)