KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Does anyone know how the replicate() function works in R and how efficient it is relative to using a for loop? For example, is there any efficiency difference between... means <- replicate(100000, mean(rnorm(50))) And... means <- c() for(i in 1:100000) { means <- c(means, mean(rnorm(50))) } (I may have typed something slightly off above, but you get the idea.)
Tags (comma-separated)
Save Edits
Cancel