Skip to content

hints based on check.call #32

@MartinKies

Description

@MartinKies

Could you give me a pointer regarding the usage of hints when working with check.call instead of check.assign and check.function?

Say I want the student to use a two-sample t-test (but expressively not a Welch-test!). The following workaround does the trick:

#< task
#Write your solution here.

#>
my.test <- t.test(column1, column1, var.equal=TRUE)
#< hint
if(true(identical(my.test,t.test(column1, column2)))){
  cat("You have used the Welch-Test. Use the option var.equal=TRUE" )}
#>
my.test

The automatic hint directs the student to the missing option, but I think it is helpful to give context information.

It would be nice however if I could write something like

#< task
#Write your solution here.

#>
t.test(column1, column1, var.equal=TRUE)
#< hint
if(true(identical(<expr_student>,t.test(column1, column2)))){
  cat("You have used the Welch-Test. Use the option var.equal=TRUE" )}
#>

This way the student would not have to do the artifical step to first save and then display the variable, as we are only interested in interpreting the output.

Is this possible/did I miss this in the manual?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions