[R] If Statement Help

2010-10-23 Thread Jason Kwok
Price 2010-10-11 99 2010-10-12101 2010-10-13102 2010-10-14103 2010-10-15 99 2010-10-18 98 2010-10-19 97 2010-10-20101 2010-10-21101 2010-10-22101 I have this dataset and I only want to return instances when the Price is 100. If I use

Re: [R] If Statement Help

2010-10-23 Thread jim holtman
Need to understand how 'indexing' is done in R: x - read.table(textConnection( Price + 2010-10-11 99 + 2010-10-12101 + 2010-10-13102 + 2010-10-14103 + 2010-10-15 99 + 2010-10-18 98 + 2010-10-19 97 + 2010-10-20101 + 2010-10-21101 + 2010-10-22

Re: [R] If Statement Help

2010-10-23 Thread Jorge Ivan Velez
Hi Jay, If x is your data, you could use subset() to do what you want: subset(x, Price 100) See ?subset for more information. HTH, Jorge On Sat, Oct 23, 2010 at 9:56 PM, Jason Kwok wrote: Price 2010-10-11 99 2010-10-12101 2010-10-13102 2010-10-14103

Re: [R] If Statement Help

2010-10-23 Thread Jason Kwok
Thanks for the help Jim. As a new user and member of this mailing list, I'm very impressed with all the support! Jay On Sat, Oct 23, 2010 at 10:21 PM, jim holtman jholt...@gmail.com wrote: Need to understand how 'indexing' is done in R: x - read.table(textConnection(

Re: [R] If Statement Help

2010-10-23 Thread Jason Kwok
Thanks Jorge. It works. Is there a way to keep the actual price in the price column instead of TRUE/FALSE but filtering on when price100? Thanks, Jay On Sat, Oct 23, 2010 at 10:37 PM, Jorge Ivan Velez jorgeivanve...@gmail.com wrote: Hi Jay, If x is your data, you could use subset() to do

Re: [R] If Statement Help

2010-10-23 Thread David Winsemius
On Oct 23, 2010, at 7:44 PM, Jason Kwok wrote: Thanks Jorge. It works. Is there a way to keep the actual price in the price column instead of TRUE/FALSE but filtering on when price100? Huh? When I use subset I get what you ask for: subset(x, Price 100) Price 2010-10-12 101