Shifting positions with relocate()
The relocate() function is helpful when you want to keep all of the
columns in your data but move some of them around. select() can do
this too, but it works better when a subset of columns is needed
instead. Try out relocate()!
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Programming with dplyr
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Move consumer_price_index after usd_conversion_rate
relocated_cpi <- imf_data %>%
___(___,
___)
# Glimpse at this data, focusing on the column order
___