Re: [R] counting values on one colum only

2008-03-23 Thread Felipe Carrillo
>--- [EMAIL PROTECTED] wrote: > > > >> >From: Felipe Carrillo <[EMAIL PROTECTED]> > >> >Date: 2008/03/22 Sat PM 06:16:59 CDT > >> >To: [EMAIL PROTECTED] > >> >Subject: [R] counting values on one colum only > >> > >&

Re: [R] counting values on one colum only

2008-03-22 Thread jim holtman
There are 7 rows since this is probably a data frame and each column in a dataframe (or a matrix in this case) all have the same number of rows. I think what you want is to 'sum' the number of times a condition is met; this might come closer to what you were expecting: sum(weekly$a != 0) On Sat,

[R] counting values on one colum only

2008-03-22 Thread Felipe Carrillo
Hi all: Can someone help me count the number of rows with values in colum "a" only. assume the name of my dataframe is "weekly" I was trying i<- nrows(weekly$a) i but returns 7 when it should be 4. Thanks a b c d 27.000 27.000 1.569 0.013