MCQs > Finance & Management > R > Suppose you need to randomly assign 100 study subjects into one of 5 groups such that there are exactly 20 subjects in each group. Which of the following R functions creates a variable Y that randomly distributes the 100 study subjects into 5 groups of equal size?

R MCQs

Suppose you need to randomly assign 100 study subjects into one of 5 groups such that there are exactly 20 subjects in each group. Which of the following R functions creates a variable Y that randomly distributes the 100 study subjects into 5 groups of equal size?

Answer

Correct Answer: Y <- sample(rep(c(1:5), each=20), size=100)

Explanation:

Note: This Question is unanswered, help us to find answer for this one

R Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

R Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it