Learn R Programming

swirl (version 2.2.0)

expr_identical_to: Test that the user has entered an expression identical to that given as the first argument.

Description

Test that the user has entered an expression identical to that given as the first argument.

Usage

expr_identical_to(correct_expression)

Arguments

correct_expression
the correct or expected expression as a string

Value

  • TRUE or FALSE

Examples

Run this code
# Test that a user has entered a particular command
  #
  expr_identical_to('myVar <- c(3, 5, 7)')

Run the code above in your browser using DataLab