check.assign.with.multiple.sol: Checks an assignment to a variable with up to 5 possibly...

View source: R/tests_for_ps.r

check.assign.with.multiple.solR Documentation

Checks an assignment to a variable with up to 5 possibly correct solutions

Description

Can be called in a #< test block for a custom test.

Usage

check.assign.with.multiple.sol(
  sol1,
  sol2,
  sol3,
  sol4,
  sol5,
  ...,
  sol.list = list()
)

Arguments

sol1

An assignment that needs to be checked, e.g. x<-5. Similar for sol2, sol3, sol4, sol5.

Examples


# Assume the task is that x shall be a number 
# below 11 and divisible by 5

check.assign.with.multiple.sol(x<-5, x<-10)


skranz/RTutor documentation built on Feb. 7, 2024, 12:53 a.m.