get_freqs | R Documentation |

getting frequencies for a vector with an optional multiplier.

```
get_freqs(x, multiplier = NULL)
```

`x` |
'vector' categorical variable to summarize. |

`multiplier` |
'numeric' vector how many times to repeat certain value, additional weights. |

'data.frame' with two columns 'input' 'Freq'

without multiplier variable it is a basic 'table' function wrapped with the 'as.data.frame' function. The 'table' function is used with the 'useNA = "ifany"' argument.

```
data("occup", package = "cat2cat")
head(get_freqs(occup$code[occup$year == "2008"]))
head(get_freqs(occup$code[occup$year == "2010"]))
head(
get_freqs(
occup$code[occup$year == "2008"],
occup$multiplier[occup$year == "2008"]
)
)
head(
get_freqs(
occup$code[occup$year == "2010"],
occup$multiplier[occup$year == "2010"]
)
)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.