Thanks A LOT guys for your posts and replying despite the fact that it might have been a bit hard to get my point (I apologise for the latter).
Josh's and Jim's examples worked perfectly. A loop was certainly not the most elegant solution. What I want to do (for those who asked) is re-generate a dataset from its observed frequency distribution. The dataset is a global collection of minimum inhibitory concentrations of different kinds of antibiotics to different bacterial species. This will then allow me to handle/analyse the data in different ways to fulfil my research objective (hopefully!!!!!). Josh was right in that my reasoning of outputting it all in a new matrix was incorrect as, effectively, rows in my dataset will have wildly differing lengths. Well, that's it for now. Have a nice weekend!!!! -- View this message in context: http://r.789695.n4.nabble.com/for-loop-help-please-tp2534666p2535014.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.