how to calculate frequency in r code example

how to calculate frequency in r

1

1 Example

0
    country year x xfrequency xfreq
 1:     CAN 1990 1          1     1
 2:     CAN 1991 0          0     1
 3:     CAN 1992 1          2     2
 4:     CAN 1993 0          0     2
 5:     CAN 1994 2          4     4
 6:     CAN 1995 1          5     5
 7:     USA 1990 0          0     0
 8:     USA 1991 2          2     2
 9:     USA 1992 1          3     3
10:     USA 1993 0          0     3
11:     USA 1994 1          4     4
12:     USA 1995 0          0     4
13:     GER 1990 0         NA     0
14:     GER 1991 1          1     1
15:     GER 1992 0          0     1
16:     GER 1993 1          2     2
17:     GER 1994 2          4     4
18:     GER 1995 1          5     5
by on

Other Code Examples