Description Usage Arguments Examples
Sometimes you expect a specific code pattern which might reflect a common misconception.
misconception()
let's you mark a pattern as such, causing the test to fail if the pattern
is found.
1 | misconception(ex, pattern, message)
|
ex |
A checkr result to use as input |
pattern |
A code pattern as found by any of the functions returning a checkr_result object. |
message |
The message to give if the |
1 2 3 4 5 6 7 | code <- for_checkr(quote({theta <- 53; x <- sin(theta)}))
misconception(code,
line_where(code,
passif(V == 53)),
message = "Angle should be in degrees, not radians.")
misconception(code, line_calling(code, sin),
message = "For the x-coordinate, use cos().")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.