[R] Newbie Question: parts of a dataframe

Sarah Goslee sarah.goslee at gmail.com
Tue Dec 30 18:09:10 CET 2008

On Tue, Dec 30, 2008 at 11:57 AM, glenn <g1enn.roberts at btinternet.com> wrote:
> Assuming I have dataframe ³test² with dim = (2,10) say;
> And that I can choose some of the data;
> Test[1,2:6]
> How do I turn this data into a list [which I would like to run a function
> across].
> Tried as.list but doesn¹t look or feel right.

Well, what DO you want it to look and feel like? A data frame is already a

> test <- rbind.data.frame(1:10, 101:110)
> is.data.frame(test)
[1] TRUE
> is.list(test)
[1] TRUE
> is.list(test[1,2:6])
[1] TRUE

How about some more information?


Sarah Goslee

More information about the R-help mailing list