# Read CSV
data <- read.csv("C:/Users/CCDJ_PC/Desktop/CABANATUAN DISTRICT JAIL PDL PROFILE.csv", header = TRUE)
if (ncol(data) != 2) {stop("CSV must contain exactly 2 columns.")}
colnames(data) <- c("Number", "Name")
seed_value <- sample(1:1000000, 1)
set.seed(seed_value)
total<-nrow(data)
# Ask for number of randomized names
y <- 6
if (y > nrow(data)) {stop("y cannot exceed number of rows.")}
selected <- sample(data$Number, y, replace = FALSE)
random_names <- data$Name[match(selected, data$Number)]
cat("Generated seed:", seed_value, "\n")
## Generated seed: 993882
cat("Total Jailpop:",total,"\n")
## Total Jailpop: 464
cat("\nRandomized names:\n")
##
## Randomized names:
for (name in random_names) {cat(name, "\n")}
## RA 9165, Secs. 5 and 11
## RA 9165, Secs. 5, 11 and Violation of RA 10591
## RA 9165, Sec. 5
## RPC, Violation of Section 10(a) in relation to Section 3 of RA 7610
## RPC, Statutory Rape and Lascivious Conduct under RA 7610
## RPC, Statutory Rape