if (!require("tidyverse")) install.packages("tidyverse")
# library(tidyverse)
<- tibble::tibble(
df1 Student = seq(from = 1, to = 20, by = 1)
Gender = rep(x = c("Male", "Female", "Male", "Female", "Male", "Female", "Male"), c(2, 4, 4, 2, 2, 2, 4))
,
) df1
# A tibble: 20 × 2
Student Gender
<dbl> <chr>
1 1 Male
2 2 Male
3 3 Female
4 4 Female
5 5 Female
6 6 Female
7 7 Male
8 8 Male
9 9 Male
10 10 Male
11 11 Female
12 12 Female
13 13 Male
14 14 Male
15 15 Female
16 16 Female
17 17 Male
18 18 Male
19 19 Male
20 20 Male