Description Usage Arguments Value
View source: R/functions_tools.r
If we are in a hurry and need to cut a lot of likert-scale or similar type of variables into MCA-friendly ordered factors this function comes in handy. cowboy_cut will try its best to create approx 3-5 categories, where the top and the bottom are smaller than the middle. Missing or other unwanted categories are recoded but still influence the categorization. So that when cowboy_cut tries to part the top of a variable with a threshold around 10 Make sure that levels are in the right order before cutting.
1 | cowboy_cut(x, top.share = 0.1, bottom.share = 0.1, missing = "Missing")
|
x |
a factor |
top.share |
approximate share in top category |
bottom.share |
approximate share in bottom category |
missing |
a character vector with all the missing or unwanted categories. |
a recoded factor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.