search for: bur_mc

Displaying 1 result from an estimated 1 matches for "bur_mc".

2012 Sep 12
6
How to append the random no.s for different variables in the same data.frame
...t forward my following query properly, though I have tried to do so.) Following is a curtailed part of my R - code where I am trying to generate say 100 random no.s for each of the products under consideration. library(plyr) n = 100 my_code = function(product, output_avg, output_stdev)     { BUR_mc = rnorm(n, output_avg, output_stdev) sim_BUR = data.frame(product, BUR_mc) write.csv(data.frame(sim_BUR), 'sim_BUR.csv', row.names = FALSE)   return(list(output_avg, output_stdev))     } result <- dlply(.data = My_data, .variables = "product", .fun = function(x)          ...