Counts elements in a vector.
Notes:
Count function counts elements by column. If you want to count the numeric values in multiple datasets by row, you can use syntax sum(vd) to sum dataset by row and generate temporary datasets of related statistics values, and then use _npts to get the number of numeric values. Alternatively, use sum(vd)_n in Set Values or F(x) =. See the sum() function for more information. Note that Sum only counts numeric values. |
int Count(vd[,int n])
vd
n
0 (default) | Counts the number of elements in the vector, size of the vector |
---|---|
1 | Counts the number of Numeric Values |
2 | Counts the number of Missing Values(NANUM) |
3 | Counts the number of elements excluding Missing Values |
4 | Counts the number of hidden rows |
Return the number of specified object by n.
int dd=count(col(a),2); dd=; //Should return the number of missing values in col(A).