dtkaplan / statisticalModeling

Other
11 stars 17 forks source link

add = TRUE is either broken or needs better documentation #13

Closed rpruim closed 7 years ago

rpruim commented 7 years ago

Is this intended to work as illustrated below?

S1 <- KidsFeet %>% sample_frac(0.5)
S2 <- KidsFeet %>% sample_frac(0.5)
gf_point(length ~ width + color:"red", data = S1) + 
  gf_point(length ~ width, data = S2, add = TRUE)
## Error in placeholder + P : non-numeric argument to binary operator
rpruim commented 7 years ago

OK. Looks like better documentation and examples would be good. This works, but requires sleuthing to discover.

gf_point(length ~ width + color:"red", data = S1) %>%
  gf_point(length ~ width, data = S2, add = TRUE)
rpruim commented 7 years ago

I recommend at least putting an example of this into the documentation for gf_point() and friends.

rpruim commented 7 years ago

the user should have to bother about add = TRUE anymore. This gets set internally based on context. Seems to be working as designed.