Re: [R] Extract only the values from a row

2011-07-11 Thread Jeff Newmiller
A) Please remove "->" from your vocabulary. Also, always put spaces on either side of an assignment so the parser doesn't get confused. B) This is a pretty basic question. ("a"==my.data$letters.1.10.) is a vector of logical values. ( ("a"==my.data$letters.1.10.) & ("k"==my.data$letters.1.20.) ) i

Re: [R] Extract only the values from a row

2011-07-11 Thread Sverre Stausland
Great - thanks for the explanation and for the solution using stringsAsFactors=FALSE in the data.frame function Sverre On Mon, Jul 11, 2011 at 3:57 PM, Sarah Goslee wrote: > Hi Sverre, > > On Mon, Jul 11, 2011 at 12:48 PM, Sverre Stausland > wrote: >> Dear helpers, >> >> how can I extract only

Re: [R] Extract only the values from a row

2011-07-11 Thread Sarah Goslee
Hi Sverre, On Mon, Jul 11, 2011 at 12:48 PM, Sverre Stausland wrote: > Dear helpers, > > how can I extract only the values from a row in a data frame? Using > [X,] doesn't do the trick: > >> data.frame(letters[1:10],letters[11:20])->my.data >> my.data[1,] >  letters.1.10. letters.11.20. > 1      

[R] Extract only the values from a row

2011-07-11 Thread Sverre Stausland
Dear helpers, how can I extract only the values from a row in a data frame? Using [X,] doesn't do the trick: > data.frame(letters[1:10],letters[11:20])->my.data > my.data[1,] letters.1.10. letters.11.20. 1 a k I would like to be able to extract only the values "a" and