Frequency of vector member

 

A.freq(o)Calculates the frequency of o in sequence A; if parameter o is absent, find the frequency of null values (including empty strings and NA).


A

1

[0,NA,2,3,,5,6,3,100,9]

2

=A1.freq(3)

3

=A1.freq()

A1 Input a vector

A2 Calculate the frequency of member "3". In A1, 3 occurs twice, so the frequency is 2/10=0.2

A3 Return the frequency of null value.