First of all the functionality of before remains fully unchanged. In addition to that however, the following two things are now possible:
aes(x, y, color = class) == aes("x", "y", color = "class")
which holds, if there are no variables / procs declared with the identifiers given as arguments. Both named and unnamed arguments are of course allowed.
Another new addition is support for factor. This forces the associated scale to be interpreted as discrete. For x and y scales this was previously possible using scale_x/y_discrete, but no such thing was possible for e.g. a color scale.
aes(x, y, color = factor(class))
Even if class does not actually satisfy the condition for a discrete scale, it will be interpreted as such. Of course this can result in really ugly plots if abused. :)
Mainly this PR turns
aes
into a macro.First of all the functionality of before remains fully unchanged. In addition to that however, the following two things are now possible:
which holds, if there are no variables / procs declared with the identifiers given as arguments. Both named and unnamed arguments are of course allowed.
Another new addition is support for
factor
. This forces the associated scale to be interpreted as discrete. For x and y scales this was previously possible usingscale_x/y_discrete
, but no such thing was possible for e.g. a color scale.Even if
class
does not actually satisfy the condition for a discrete scale, it will be interpreted as such. Of course this can result in really ugly plots if abused. :)