code_includes: Test whether code includes a function

View source: R/utils.R

code_includesR Documentation

Test whether code includes a function

Description

Test whether the submission code includes function fn.

Usage

code_includes(fn, code, remove_comments = TRUE)

Arguments

fn

function to search for

code

the submission code (usually you pass the variable ._ar$current_code)

remove_comments

do you want to remove comments before checking?

Value

logical; TRUE if the function is found anywhere in the code (comments in the code are ignored).


dalejbarr/assessr documentation built on Jan. 25, 2024, 10:47 p.m.