Aggregating Data in Big Data Frame Using R

I’m training to use R to work with real-life data, not just in the simplified learning context. And I publish notes about it with pieces of code that I hope to use again. See below the sample of aggregating the data using aggregate commands. Also, I show how to combine the data from several sources into one data frame using the cbind command. After I have created the resulting data frame, I sorted it using the order command. And I drew a visually appealing table based on that data frame using a grid library.  I hope some of my R code chunks will also be useful to you.
Yesterday I have found a large and interesting data set at https://catalog.data.gov/dataset/nutrition-physical-activity-and-obesity-behavioral-risk-factor-surveillance-system-f645f. It provides aggregated data on obesity, nutrition and physical activity of American citizens.
You may want to reproduce my actions in R. To do this, you can download the data set here if it suddenly becomes unavailable by the original link. As far as I understand, this dataset can be freely distributed.

Continue reading “Aggregating Data in Big Data Frame Using R”

Sponsored Post Learn from the experts: Create a successful blog with our brand new courseThe WordPress.com Blog

WordPress.com is excited to announce our newest offering: a course just for beginning bloggers where you’ll learn everything you need to know about blogging from the most trusted experts in the industry. We have helped millions of blogs get up and running, we know what works, and we want you to to know everything we know. This course provides all the fundamental skills and inspiration you need to get your blog started, an interactive community forum, and content updated annually.