trying to run a sequence of numbers for a function i defined. but it only returns one sample instead of 500

后端 未结 0 976
忘掉有多难
忘掉有多难 2020-12-15 00:50
Y = function(N, mu, sigma){
  sample = exp(rnorm(N, mu, sigma))
  return(sample)
}

mu_range = seq(0, 5, by = 0.01)
for (i in mu_range){
  sample_mu = Y(10, i, 2)
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题