Hello, everyone.
Please, I need help. I'm very new to R and don't know almost anything.
I have an Excel table with 180 lines, each one is a volunteer with an ID 22XXX (5 characters), therefore, I need to ranzomize this table and divide it into 12 groups of 14 volunteers and a last one with 12 volunteers. But I couldn't manage how to do that.
I ran the following script:
install.package(readxl)
library(readrxl)
# Create an object (table containing the data to be randomized):
random_samples<- read_excel("C:\\XXX\\XXX\\XXX\\P4\\amostrasrandomizacao1.xlsx")
# Randomize the table created:
randomizado<- sample(random_samples$IDS)
# Export the file:
write.csv(randomizado,"C:\\XXX\\XXX\\XXX\\P4\\randomfinal.csv",row.names = FALSE)
I was planing to perform this blocks construction manually in Excel, but I'd like to learn how to do that on RStudio. I went through many tutorials and videos but none of them addressed this issue.
Could you guys help me out in this issue?
Thank you in advance.
Thalles