LIMITED TIME OFFER: 50% OFF OF PREMIUM WITH OUR ANNUAL PLAN (THAT'S $294 IN SAVINGS).
GET OFFER

Difficulty understanding syntax

Screen Link:
https://app.dataquest.io/c/69/m/402/working-with-missing-data/7/visualizing-correlation-matrix-with-heatmaps

I am struggling to understand the code behind the plot_na_correlation function. Mainly these parts:

col_names[row_number()]
col_names[order(colSums(is.na(missing_corr_up)))]
col_names[order(-colSums(is.na(missing_corr_up)))]

I am struggling to understand what placing functions inside square brackets next to a function that accesses columnn names does and why we want to do it and why this is the best way to do it.

Thankyou for your time and help.