Use [[ instead of $. x$y is short hand for x[["y"]].
[[
$
x$y
x[["y"]]
my_helper <- function (my_param) { levels(diamond[[my_param]]) } my_helper("cut")
2.1m questions
2.1m answers
60 comments
57.0k users