so I just started programming in R and am still pretty unfamiliar with the software.
Recently, I was tasked with finding the means (separately) of a replicated group of data, where my main function is a simple continuous uniform distribution.
After generating 500 replications of the distribution using runif(5, min = 15, max = 30)
, this table was created.
What I'm currently looking for to find the sample mean for each version (V1, V2, etc.) separately, and have it paste out like this, but with 500 different means.
Is there a method to generate the data table first (as I already did), before finding the sample mean later? I tried using meanreplicate5 <- replicate(500, mean(replicate5))
, seeing "replicate5" was already defined with the data table, but it just gave me 500 values of the same number, 22.5.
Thank you for reading!