set.seed(3349)
<- c("Control R1", "Control R2", "Control R3", "5 mg/L R1", "5 mg/L R2", "5 mg/L R3", "45 mg/L R1", "45 mg/L R2", "45 mg/L R3")
conditions <- c("S295C001", "S290C001", "S291C001", "S287C001", "S275C001", "S277C001", "S283C001", "S301C001", "S286C001")
animal_id <- data.frame(
treatment_assignments_exp3 Conditions = sample(conditions),
animal_ID = sample(animal_id)
)print(treatment_assignments_exp3)
Conditions animal_ID
1 5 mg/L R2 S275C001
2 5 mg/L R3 S295C001
3 Control R1 S277C001
4 Control R3 S283C001
5 5 mg/L R1 S290C001
6 45 mg/L R3 S291C001
7 Control R2 S286C001
8 45 mg/L R1 S287C001
9 45 mg/L R2 S301C001
#save assignments in csv for downstream use as metadata
write.csv(treatment_assignments_exp3, file = "treatment_assignments.csv")