How to refer to a variable name with spaces?

后端 未结 3 1530
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 07:32

In ggplot2, how do I refer to a variable name with spaces?

Why do qplot() and ggplot() break when used on variable names with

3条回答
  •  隐瞒了意图╮
    2020-12-08 08:21

    Using get is not more "formal", actually I would argue the opposite. As the R help says (help("`")), you can almost always use a variable name that contains spaces, provided it's quoted. (Normally, with a backtick, as already suggested.)

提交回复
热议问题