  Hi again!

I'm trying to follow your general goal from your questions today but 
it's not easy.

First, declaring a data.frame of 0 rows is a bad idea. It is much faster 
to define the length and number of rows from the beginning and to fill 
it then.

Second, I don't know how to do it! What I know is that, to my knowledge 
(maybe I overlooked some posts in the archive), there is no easy way to 
do it, such as lists or vectors. The easiest might be to create a list 
with the correct length with list(), fill it with whatever data and then 
convert it to a data.frame with as.data.frame() when it's finished.

Third, for your problem, maybe do.call() can help you. I don't know what 
you did up to now, but it sounds that you tried to do it iteratively (in 
a loop) instead of vectorizing it (though I don't know if do.call() can 
be really called vectorized). There was a post yesterday/today on 
do.call(). You'll surely find it if you look with RSiteSearch().

Last, I don't know if it is relevant for you, but I've read on the list 
many times that matrices are faster to deal with. If all your columns 
and rows have the same type, then you can use matrices.

There are surely guys that know more about this stuff somewhere on the 
list, but I hope it can get you started.
Ivan

Le 9/6/2010 16:56, rajesh j a écrit :
> Hi,
>
> first off, I wanna ask how do I declare a data.frame of 0 rows and n
> columns?
>
> Coming to my problem,
>
> I have a data.frame of 22 columns by dynamic rows which I insert using
> rbind. The total number of rows could go upto 2,00,000. The problem is that
> after about 800 or 900 get inserted rbind starts overwriting the data.frame
> and I end up with a total of 800-900 rows. What is up with that?
> The 22 columns are all strings each having about 10 characters

-- 
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra@uni-hamburg.de

**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php


	[[alternative HTML version deleted]]

