Hi,
I have got a data frame:

df=data.frame(x=c(3,6,7),y=c(2,7,4))

and I would like to write my values from data frame to list using loop, for
example:

lista=list()
for (i in 1: length(?)){
        lista[[?]][?] = df [?]
}
But I havn't got any idea what I should put in places where I put a question
mark?  

As a rusult I would like to get a list like this:
list:
[[1]]
3,6,7
[[2]]
2,7,4

I wll be very happy if somebody can help me


-- 
View this message in context: 
http://old.nabble.com/write-data-frame-in-a-list-tp26281645p26281645.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to