Skip to content
Prev 140117 / 398506 Next

counting values on one colum only

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, Mar 22, 2008 at 6:16 PM, Felipe Carrillo
<mazatlanmexico at yahoo.com> wrote: