powered by
Simple count including zero###
counta(z, y)
a vector you would like to check
an element you would like to count.(Even it is not included in z)
the times that y appears in z
This function counts how many the assigned elements there are in one vector.
# NOT RUN { z <-rbinom(20,1,0.5) counta(z,0) # }
Run the code above in your browser using DataLab