How to create an R programming question via Mercer | Mettl UI

How to create an R programming question via Mercer | Mettl UI


To create an R programming question via UI in your Mercer | Mettl account, follow the steps given below: 

1. After logging in to your Mettl account, click on the My Questions tab on the top and then click on the Add Question button on the top right.



2. Click on Select Question Type and go to Application Based Questions in the drop-down options and then select RStudio Question.





3. Provide a topic name under which the question is supposed to be added by clicking on the Select Topic button. In case the topic is not one that already exists, you can create a new one. 




4. After selecting the question type and specifying the topic, you will be redirected to the question creation screen. Enter the question-specific information in various fields like the image given below:   



a. Difficulty Level: Assign a difficulty level to your question. You can set it to Easy, Medium, or Difficult by clicking on the drop-down. 

b. Question Details: The description of the question will come here; it should include the problem statement that consists of a scenario wherein the test taker must identify the approach which can be used and the statements/code that can be written to arrive at a solution for the question  
For instance, “You are given a dataset "covid_data.csv" containing information about Covid-19 cases in different countries. Your task is to write R code to perform the following tasks: 

1. Load the "covid_data.csv" file. 

2. Create a new column "case_fatality_rate" in the dataset, which represents the proportion of deaths to the total number of cases for each country and each day.” 
Note: You can also make use of the editor menu on top to add specific formatting in the problem statement such as images, code snippets, etc. 

c. Question Tags (Optional): This field stores the meta-data about the question.  
Note: You can leave this field empty. 

5. Fill in the Candidate Template tab. It consists of a coding editor, a console tab, and a plots tab. The code written in this text editor appears to the test-taker as pre-written code when attempting an R programming question. On clicking upon the Run Code button, your code will be run on the Console tab. In case any plot is made, it will be visible under the Plot tab. 



6. R programming questions can be graded both manually and automatically. If you select manually, the solution submitted by the test-taker will have to be evaluated after the assessment is over. If you select automatic grading, you will have to define testcase(s).  


To define testcases, fill in the Grade Template tab. This tab consists of an editor and a testcase tab. Write your testing code in this editor to define testcases using the testhat unit testing library.  
 
Refer to the image below as a sample for the same. After writing your code, click on the Parse Code button. If there is no error in the code, the test cases will show up in the tab beside the text editor.  
 
Allot marks to each test case to finish up with automatic grading. 



7. Once you are done filling in all the details, click on the Save button to save your question.