Skip to content
Prev 278448 / 398513 Next

Is there way to add a new row to a data frame in a specific location

On Thu, 24 Nov 2011, Jeff Newmiller wrote:

            
Just for the record, it actually is (R vectors have a LENGTH and 
TRUELENGTH property at C level), but this is AFAIK only used 
internally.

The better question is why you care about the order of the rows of a 
data frame?  A good way to think of a d.f. is like a table in a DBMS: 
for efficiency the cases are unordered, but you can retrieve them in 
any order you want (or no order).  Indeed, for efficient operations on 
millions of rows an R-DBMS interface is highly recomemded -- see the 
R-data manual.