Re: [R] subset of obersevation depending on multiple conditions

2014-04-29 Thread Christoph Schlächter
Please refer to www.vestas.com/legal/notice > If you have received this e-mail in error please contact the sender. > > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > > On Behalf Of Christoph Schlächter > &g

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Frede Aakmann Tøgersen
nal Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of arun > Sent: 28. april 2014 13:58 > To: R. Help > Subject: Re: [R] subset of obersevation depending on multiple conditions > > Hi, > > The conditions are not very c

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Frede Aakmann Tøgersen
ror please contact the sender. > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Christoph Schlächter > Sent: 28. april 2014 10:38 > To: r-help@r-project.org > Subject: [R] subset of obersevation depending on multip

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread arun
Hi, The conditions are not very clear.  Based on the rows you wanted to pick, may be this helps, #It is better to dput() the example.     dat <- structure(list(Date = structure(c(14610, 14611, 14612, 14613, 14614, 14615, 14616, 14617, 14618, 14619, 14620, 14621, 14622, 14623, 14624, 14625, 14

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Ivan Calandra
Hi Christoph, I'm not sure I understand your conditions. It is an "AND" or an "OR", i.e. must both conditions be met to subset or any one of them? From your explanation, I would think you really mean AND, but then I don't understand why you would select both lines 3 and 4. I would just say: d

[R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Christoph Schlächter
Hello, I want to subset a data.frame containing the variables "Date" in (%Y %m %d ) and "N". I want to print "Date" and "N" if N is less than or equal to 0.3 and if "N" is also less than or equal to 0.3 on the day before the day where "N" is less than or equal to 0.3. This would be the case in