Re: [R] compare and count data

2013-01-21 Thread David L Carlson
7843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Jim Lemon > Sent: Monday, January 21, 2013 1:17 AM > To: Roslina Zakaria > Cc: r-help@r-project.org > Subject: Re: [R] compare and count data >

Re: [R] compare and count data

2013-01-21 Thread arun
odd, critical1<-c(rep(c(1.61,75.89),(ncol(mydata)-1)/2),1.61) colSums(mapply("<",mydata,critical)) #V1 V2 V3 V4 # 0 19  0  0 A.K. From: Roslina Zakaria To: arun Sent: Monday, January 21, 2013 2:45 AM Subject: Re: [R] compare and count dat

Re: [R] compare and count data

2013-01-20 Thread arun
HI, Your example data had only 4 columns mydata<-read.table(text="   3.014505 62.96425 3.014505 138.0673   2.817503 56.03400 2.817503 133.3411   2.976227 47.12192 2.976227 139.2438   2.825495 75.05284 2.825495 129.2959   2.793500 52.75190 2.793500 130.9874   3.006333 54.56210 3.006333 136.2982  

Re: [R] compare and count data

2013-01-20 Thread Jim Lemon
On 01/21/2013 04:39 PM, Roslina Zakaria wrote: Dear r-users, I have these data below: I would like to compare each column with a certain value and count how many in each column less than that specified value. odd column (1,3,5) will compare with 1.61 and even column (2,4,6) will compare with