Recoding means changing the levels of a variable, for instance changing “1” to “woman” and “2” to “man”. Binning means aggregating several variable levels to one, for instance aggregating the values From “1.00 meter” to “1.60 meter” to “small_size”. Both operations are frequently necessary in practical data analysis. In this post, we review some methods to accomplish these two tasks. Let’s load some example data: data(tips, package = "reshape2") Some …