Hello,
right now, i have a program to collect data into a table. right now, my table is 
table1 <- data.frame(trial = NA, x = NA, y = NA)
for each time when i want to add data into my data, i have to copy data of table into an array for each column, and then i add new data into my array, then i copy my array into the table one column by one column. For example
temptrial <- table1$trial;
temptrial <- c(temptrial, "1, 2");
tempx <- table1$x;
tempx <- c(tempx, "1, 2");
tempy <- table1$y;
tempy <- c(tempy, "1, 2");
 
 
table1 <- data.frame(trial = temptrial, x = tempx, y = tempy);
 
the way i am doing makes my program very slow, because i need to copy the data from one variable to another variable all the time. however, it should not be necessary, so i am just wasting the memory, can any one tell me how can i make my program run faster without copying temparary data all the time.
 
Also, i have to write this table in a file using "cat", however, "cat" does not support the table format, so i can't do it. could any one also tell me how can i write my data into an outfile.
 
Thank you so much
 
C-Ming 
 
Feb 13, 2005

		
---------------------------------


	[[alternative HTML version deleted]]


