Like Sarah said, what you say below makes very little sense, but as a total shot in the dark, is this what you mean?
lapply(1:nrow(df), function(i) x[i,] ) Michael On Jan 13, 2012, at 11:15 AM, Sarah Goslee <sarah.gos...@gmail.com> wrote: > I have to admit, I have very little idea what you are trying to do. Can you > provide an example? > > In general, the i-th column of a data frame can be accessed with > > mydataframe[, i] > > but that doesn't help with whatever you want to do with apply(). > > Sarah > > On Fri, Jan 13, 2012 at 10:45 AM, statquant2 <statqu...@gmail.com> wrote: >> Hello, >> I have a data.frame and I want to transfor it in a list of rows or columns. >> I can do apply(myDataFrame,MARGIN=1,FUN=???) >> >> I remember that there is a function which mean return or access column ... >> something like "::" or "]," or "[," >> I can't remember can somebody refresh my memory? >> > -- > Sarah Goslee > http://www.functionaldiversity.org > > ______________________________________________ > 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. ______________________________________________ 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.