Frequency Tables

Mala Mahadevan shows how to generate a frequency table in T-SQL and in R:

My results are as below. I have 1000 records in the table. This tells me that I have 82 occurences of age cohort 0-5, 8.2% of my dataset is from this bracket, 82 again is the cumulative frequency since this is the first record and 8.2 cumulative percent. For the next bracket 06-12 I have 175 occurences, 17.5 %, 257 occurences of age below 12, and 25.7 % of my data is in this age bracket. And so on.

Click through for the T-SQL and R scripts.

Related Posts

Regular Expression Cheat Sheets

Mara Averick shows off a collection of regular expression guides: There are helpful string-related R packages 📦, stringr (which is built on top of the more comprehensive stringi package) comes to mind. But, at some point in your computing life, you’re gonna need to get down with regular expressions. And so, here’s a collection of some of the Regex-related […]

Read More

Visualizing A Single Number

Tim Bock shows a dozen methods for visualizing a single number: There are a number of situations in which it can be advantageous to create a visualization to represent a single number: To communicate with less numerate viewers/readers; Infographics and dashboards commonly use one important number; To attract the attention of distracted or busy viewers/readers; […]

Read More

Categories

March 2017
MTWTFSS
« Feb Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031