[R] Data.frames : difference between x$a and x[, "a"] ? - How set new values on x$a with a as variable ?

Hadley Wickham hadley at rice.edu
Fri Sep 10 15:42:01 CEST 2010


>>> I'm having trouble parsing this. What exactly do you want to do?
>> 1 - Put a list as an element of a data.frame. That's quite convenient for my pricing function.
>
> I think this is a really bad idea. data.frames are not meant to be
> used in this way. Why not use a list of lists?

It can be very convenient, but I suspect the original poster is
confused about the different between vectors and lists.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



More information about the R-help mailing list