Hi again all, Several replied ASAP that I also needed reshape loaded and not just reshape2. Hmmm tried that and I had some output but not the correct format.
What I need is to run simulations of time overlap between species as per the simulation program data input constraints: The basis for the simulations is a species by _time-use matrix in which species are arranged in rows, and time intervals are arranged chronologically in columns.___ TimeOverlap only uses text tab-delimited files with no headings for columns or rows.Empirical data must be specified in proportional abundances (0 to 100) and totals for each species should be the same (100%). With the existing code the result was rows were correct for species but dates were used for columns rather than the times. The input file read has long format 4 columns - species; location; date; time. It dawns on me I may need to have a sub sample of the main data set by Location ID first then have the code run but for time values and not dates. I need to tweak this a bit more to see if I can figure that out as well. I will have many repetitions of this dat reformatting so it is important I get the code correct one time so I can run this on the gazillion or so data sets accumulated. Rather than use reshape can I use _recast_ in place of cast and stick with reshape2? Bruce [[alternative HTML version deleted]] ______________________________________________ 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.