Add expectations to a parsons problem.

pass_if(f, message = NULL)

fail_if(f, message = "Incorrect")

message_if(f)

contains_all(x, ...)

contains_any(x, ...)

Arguments

f

One of:

  • A character vector, indicating an exact match

  • A function of the function function(x){...} that evaluates to TRUE or FALSE

  • A function of the form ~ ., as used by the tidy evaluation, e.g. in purrr::map

message

Message to display if fun evaluates to TRUE

x

Answer to test

...

Combined into an answer list