Exercise

Mutate across multiple columns

You can use the across() function inside of mutate() to specify which columns you'd like to work with, which function to apply to these columns, and any text that you'd like to add on to the names of the new columns. Work with imf_data to create newly engineered columns from existing columns.

Instructions 1/2

undefined XP
    1
    2
  • Multiply all columns that contain "as_perc_gdp" by gdp_in_billions_of_usd, keeping only the columns used in the analysis, and assign this result to imf_new_cols.