[R] access/row access/col access

2012-01-13 Thread statquant2
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? -- View this

Re: [R] access/row access/col access

2012-01-13 Thread Sarah Goslee
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

Re: [R] access/row access/col access

2012-01-13 Thread Jeff Newmiller
http://cran.r-project.org/doc/manuals/R-intro.pdf --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...

Re: [R] access/row access/col access

2012-01-13 Thread R. Michael Weylandt michael.weyla...@gmail.com
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

Re: [R] access/row access/col access

2012-01-13 Thread David Winsemius
On Jan 13, 2012, at 10:45 AM, statquant2 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