• Home
  • Common R Tasks

Learn Common R Tasks by Following Examples (Join Us)

Example Data Management Operations Exercises

Lesson Objectives

Once R data frames are created, then data management operations should be learned.  In this section, focus on how to select, drop and filter variables and records using the key terms below.  Examples on this page are useful to complete hands-on exercises. 

Key Terms: keep, drop, assignment, subset, sort, ifelse, if_else, case_when, operators, cut, str, is.numeric, is.character, is.Date, rename, recode, replace, in, data frame options, grep, order, paste, cat, toupper, tolower, as.character, lag, lead, complete, is.na, sapply, print, loop.

Table of Contents

  • Keep and Drop Variables
  • Subsetting and Sorting Records
  • Derive Variables
  • Operators for Value Comparisons
  • Numeric, Character and Date Conversions
  • Character Functions
  • Format Object
  • In Operator
  • Sorting Records
  • Count number of values in Character Variable
  • Concatenate Character Variables
  • Toupper and Tolower Values
  • Compress Characters
  • Lag and Lead Values
  • Sapply across all Variables
  • Data Frame Options
  • Loops 
  • Exercises
  • Videos
  • References


Powered by Wild Apricot Membership Software