Re: [R] creating a list of lists from a data frame

2008-03-28 Thread talepanda
try master_list <- apply(x, 1, as.list) HTH > Dear group, > I have a dataframe (x). (4 rows, 3 columns for > example) > > I want to create a master list (my_list) from data > frame. > > I want each row of x to be a list. > > > I tried 3 different ways: writing a loop, using apply, > and go

Re: [R] creating a list of lists from a data frame

2008-03-27 Thread jim holtman
Is this what you want? > x titlesrc probesets 1 chr16q positional CMAR,USP10,PSORS8,WT3,SLI1 2 chr4p positional ATP5I,MHW1,STGD4 3 chr1q13 positionalSCARNA2 4 chr4q1 positional MORF4LP4 > lapply(seq(nrow(x)), function