David Kreil wrote:

Ok, how can I both allocate storage and specify column names in a data.frame call, please? Apologies if I'm being slow here.

With many thanks again,

David.


Something like.... (UNTESTED code follows)


templateColumn <- rep(NA,1000) # for 1000 rows

foo <- data.frame( x = templateColumn,
  y = templateColumn,
  z = templateColumn )  # or however many columns you need

bar <- foo

for(ii in your.iterative.sequence) {
  if(ii > 1000) {
    bar <- rbind(bar,foo)
  }
  bar[ii,] <- your.function()
}

Cheers

Jason
--
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
[EMAIL PROTECTED]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to