DataThink Development
  • Modules
  • R Help
  • Resources
    • Course Textbook
    • R for Data Science
    • Git/GitHub and R
    • R Markdown: The Definitive Guide
    • Geocomputation with R

    • Supplemental Material
    • Happy Git and Github for the useR
    • plotly for R
    • Computing in R for Social Sciences
    • Statistical Concepts in Presenting Data:
    • Advanced R
    • R Packages
    • Tidy evaluation
    • Fundamentals of Data Visualization
    • Geocomputation with R
    • Crosstalk: htmlwidgets add-on

On this page

  • Task 13: Controlling categorical variables (factors)
    • Background
    • Reading
    • Tasks

task-13

Task 13: Controlling categorical variables (factors)

Background

When we are visualizing data with categorical variables, we have to deal with character strings as groupings. The problem with summarizing categorical data in a table or a plot is how to order the groups. Using the concept of Factors allows us to dictate the order of these groupings for presentation. We will revisit the stock data from a previous task to create a table and a plot that has the months correctly labeled and ordered.

  • Course Website

Reading

This reading will help you complete the tasks below.

  • o Chapter 15: R for Data Science - Factors
  • o forcats R package

Tasks