Description Usage Arguments Examples
View source: R/misconception.R
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 | code <- for_checkr(quote({theta <- 53; x <- sin(theta)}))
misconception(code, line_where(code,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.