Show the hint message if the student has called a certain function (not nested in another function) somewhere in the chunk. If you also want to consider the call arguments use hint.stud.call or hint.stud.assign instead.

hint.stud.fun(fun.name, msg, ps = get.ps(), env = parent.frame())

Arguments

fun.name the function name as string. a string that shall be shown as hint if the student made the call in his code