If I use df$columnName
, you only get a vector which does not have the name of the column anymore.
This means names(df$columnName) --> null
I could use df["columnName"]
, but this is kind of unhandy.. because I have to pass the columnName as string character.