swirldev / swirl

:cyclone: Learn R, in R.
http://swirlstats.com
Other
1.14k stars 601 forks source link

swirl exit when use ggplot #750

Open haolianxu opened 5 years ago

haolianxu commented 5 years ago

When I was answering the following question, swirl just exit. Even when I try skip, the swirl run ggplot(diamonds, aes(x=z, y=price)) + geom_point(), then it just exit.

The column "z" in the diamonds dataset represents a diamond's depth in millimeters. | Create a scatter plot of the diamonds dataset with z on the x axis and price on the y | axis.

ggplot(diamonds, aes(x=z, y=price)) + geom_point() Show Traceback

Rerun with Debug Error: Base operators are not defined for quosures. Do you need to unquote the quosure?

Bad:

lhs != myquosure

Good:

lhs != !!myquosure Call rlang::last_error() to see a backtrace | Leaving swirl now. Type swirl() to resume.

haolianxu commented 5 years ago

The following is the traceback info

14. stop(cnd) 13. abort(paste_line("Base operators are not defined for quosures.", "Do you need to unquote the quosure?", "", " # Bad:", bad, "", " # Good:", good, )) 12. Ops.quosure(desired[[a]], v$mapping[[a]]) at customTests.R#21 11. aes_matches(x = "z", y = "price") at #1 10. eval(parse(text = keyphrase)) 9. eval(parse(text = keyphrase)) 8. testMe(keyphrase, e) 7. FUN(X[[i]], ...) 6. lapply(tests, function(keyphrase) { testMe(keyphrase, e) }) 5. testResponse.default(e$current.row, e) 4. e$instr[[e$iptr]](e$current.row, e) 3. resume.default(e, ...) 2. resume(e, ...) 1. (function (expr, val, ok, vis, data = e) { e$expr <- expr e$val <- val ...