LogFAQs > #908637818

LurkerFAQs, Active DB, DB1, DB2, DB3, Database 4 ( 07.23.2018-12.31.2018 ), DB5, DB6, DB7, DB8, DB9, DB10, DB11, DB12, Clear
Topic List
Page List: 1
TopicHas anyone here ever worked with R?
MrMelodramatic
09/12/18 11:03:10 PM
#1:


I need to get a random sample of 20 numbers between 1 and 50, find the mean and save it as a variable, and then repeat that process 1000 times.

I know how to do it by brute force
x1 <- Sample(1:50, 20)
m1 <- mean(x1)


But does anyone here know how I can do it without literally typing everything out a thousand times
---
Proud to be EPic
Texas Aggie, Class of 2018 A-Whoop!
... Copied to Clipboard!
Topic List
Page List: 1