In no particular order:īecause I am fussy, I managed to find some slight personal niggle with all of them, so it’s hard to pick an overall personal winner for all circumstances. So what’s available outside of base R? I tested 5 options, although there are, of course, countless more. prop.table(table(data$Type))īut you’d need to run both commands to understand the count and percentages, and the latter inherits many of the limitations from the former. The table command can be wrapped in the prop.table command to show proportions. The output also isn’t tidy and doesn’t work well with Knitr. It does have a useNA parameter that will show that though if desired. By default it hasn’t highlighted that there are some records with missing data. But it doesn’t show percentages or any sort of cumulation. table(data$Type)Ī super simple way to count up the number of records by type. Most famously, perhaps the “table” command. So what options come by default with base R?
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |