Re: [R] problems subsetting

2010-11-18 Thread David Winsemius
On Nov 18, 2010, at 10:42 AM, David Winsemius wrote: On Nov 18, 2010, at 10:25 AM, Martin Tomko wrote: Hi Gerrit, indeed, that works. Excellent tip! For reference, I did this: subset1<-subset(summarystats,(Type==1)&(Class==1)&(Category==1)) I am still not totally sure when one uses "&" am

Re: [R] problems subsetting

2010-11-18 Thread Ivan Calandra
Hi Martin, I think Steve meant dput(df), as I already told you Ivan Le 11/18/2010 17:40, Steve Lianoglou a écrit : Hi, On Thu, Nov 18, 2010 at 10:42 AM, Martin Tomko wrote: Thanks Steve, that explains it... Unfortunately, I did nto get that from my R docs... I am still searching for a sol

Re: [R] problems subsetting

2010-11-18 Thread Steve Lianoglou
Hi, On Thu, Nov 18, 2010 at 10:42 AM, Martin Tomko wrote: > Thanks Steve, that explains it... Unfortunately, I did nto get that from my > R docs... > > I am still searching for a solution for matching the entries in my matrix by > matching the rownames to the entires in a subset I got using Gerri

Re: [R] problems subsetting

2010-11-18 Thread David Winsemius
On Nov 18, 2010, at 10:42 AM, Martin Tomko wrote: Thanks Steve, that explains it... Unfortunately, I did nto get that from my R docs... I am still searching for a solution for matching the entries in my matrix by matching the rownames to the entires in a subset I got using Gerrit's metho

Re: [R] problems subsetting

2010-11-18 Thread David Winsemius
On Nov 18, 2010, at 10:25 AM, Martin Tomko wrote: Hi Gerrit, indeed, that works. Excellent tip! For reference, I did this: subset1<-subset(summarystats,(Type==1)&(Class==1)&(Category==1)) I am still not totally sure when one uses "&" amd when "&&" - I was under the impression that && stan

Re: [R] problems subsetting

2010-11-18 Thread Peter Ehlers
On 2010-11-18 07:25, Martin Tomko wrote: Hi Gerrit, indeed, that works. Excellent tip! For reference, I did this: subset1<-subset(summarystats,(Type==1)&(Class==1)&(Category==1)) I am still not totally sure when one uses "&" amd when"&&" - I was under the impression that&& stands for logical

Re: [R] problems subsetting

2010-11-18 Thread Martin Tomko
Thanks Steve, that explains it... Unfortunately, I did nto get that from my R docs... I am still searching for a solution for matching the entries in my matrix by matching the rownames to the entires in a subset I got using Gerrit's method. Any idea? Thanks Martin On 11/18/2010 4:35 PM, Ste

Re: [R] problems subsetting

2010-11-18 Thread Steve Lianoglou
Hi, On Thu, Nov 18, 2010 at 10:25 AM, Martin Tomko wrote: > Hi Gerrit, > indeed, that works. Excellent tip! > > For reference, I did this: > > subset1<-subset(summarystats,(Type==1)&(Class==1)&(Category==1)) > > I am still not totally sure when one uses "&" amd when "&&"  - I was under > the impr

Re: [R] problems subsetting

2010-11-18 Thread Martin Tomko
Hi Gerrit, indeed, that works. Excellent tip! For reference, I did this: subset1<-subset(summarystats,(Type==1)&(Class==1)&(Category==1)) I am still not totally sure when one uses "&" amd when "&&" - I was under the impression that && stands for logical AND Thanks a lot. Martin On 11

Re: [R] problems subsetting

2010-11-18 Thread Ivan Calandra
Hi, I got a bit lost with your explanation for your second problem. A reproducible example would DEFINITELY help to understand what you have and what you're trying to get. For your first problem subset1 <- summarystats[summarystats$Class == 1 & summarystats$Type == 1 & summarystats$Category

[R] problems subsetting

2010-11-18 Thread Martin Tomko
Dear all, I have searched the forums for an answer - and there is plenty of questions along the same line - but none of the paproaches shown worked to my problem: I have a data frame that I get from a csv: summarystats<-as.data.frame(read.csv(file=f_summary)); where I have the columns Datase