Session Ready
Exercise

Caret standardization

Often, we will need to standardize multiple variables at once. The Pokemon dataset contains many numeric variables that are measured in different scales, including attack, defense, spatk and spdef.

Instructions
100 XP
  • Select the variables attack, defense, spatk and spdef, and save them as poke_vars.
  • Standardize the four variables using the preProcess() function.
  • Use predict() to transform preprocessed variables back into the main data frame.
  • Summarize the four standardized variables.