Re: [R] Select rows from Data Frame with conditions

2013-03-07 Thread Sachinthaka Abeywardana
yep, that did the trick. Thanks, Sachin On Fri, Mar 8, 2013 at 1:24 PM, Jeff Newmiller wrote: > Something along the lines of > > top100 <- A[match(B,A[,1]),] > > Please provide R code with sample data and desired output. See > http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-rep

Re: [R] Select rows from Data Frame with conditions

2013-03-07 Thread Rolf Turner
On 03/08/2013 02:22 PM, Sachinthaka Abeywardana wrote: Hi all, I have two dataframes. The first (A) contains all the stock prices for today including today. So the first column is the stock Symbol and the second column is the stock price. The second (B) is the symbol list in the top 100 stocks.

Re: [R] Select rows from Data Frame with conditions

2013-03-07 Thread Jeff Newmiller
Something along the lines of top100 <- A[match(B,A[,1]),] Please provide R code with sample data and desired output. See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example --- Jeff Newmille

[R] Select rows from Data Frame with conditions

2013-03-07 Thread Sachinthaka Abeywardana
Hi all, I have two dataframes. The first (A) contains all the stock prices for today including today. So the first column is the stock Symbol and the second column is the stock price. The second (B) is the symbol list in the top 100 stocks. I want to pick out from dataframe A only the rows contai