https://www.R-exams.org/R/exams2023-08-18T10:18:06+02:00Automatic generation and evaluation of exams. From Markdown, LaTeX and R code to standalone documents, learning management systems and live voting.Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/Jekyllhttps://www.R-exams.org/tutorials/chatgpt/Using ChatGPT for Creating Multiple- and Single-Choice R/exams Questions2023-05-22T00:00:00+02:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/Tutorial for creating knowledge quiz questions with the help of ChatGPT in multiple- or single-choice format for R/exams.<p>Tutorial for creating knowledge quiz questions with the help of ChatGPT in multiple- or single-choice format for R/exams.</p> <p><img alt="Using ChatGPT for Creating Multiple- and Single-Choice R/exams Questions" src="https://www.R-exams.org/images/chatgpt.title.png" /></p> <p>Guest post by <a href="https://sites.google.com/site/andreassteinmayr/">Andreas Steinmayr</a> (Universität Innsbruck, Faculty of Economics and Statistics).</p> <h2 id="idea">Idea</h2> <p>Large language models such as ChatGPT have received much attention in recent months. There has been a lot of praise, but also criticism. One of the issues raised was that ChatGPT makes up answers to questions, and does so in a way that the answers appear plausible to readers not familiar with the subject. This might be harmful behavior in many instances, especially in academic settings, but there might also be an application: Creating multiple-choice and single-choice questions for exams.</p> <p>Multiple-choice and single-choice questions are commonly used in assessments, exams, and surveys. They are popular because they can be quickly and efficiently graded by computers or instructors for many test-takers. However, creating high-quality questions in multiple-choice or single-choice format is challenging and time-consuming for various reasons:</p> <ul> <li>Questions must be unambiguous, and the false answers must be plausible enough to make the question challenging.</li> <li>Test-takers should have to distinguish right from wrong answers based on the substantive content of the answers, and not from the way how answers are formulated.</li> <li>Questions need to be updated regularly (e.g., every semester) if test-takers can collect and distribute them to future test-takers.</li> </ul> <p>I am currently teaching a class in introductory economics, and we have regular short take-home assignments with single-choice questions using some random variation in the selection of questions and answer alternatives. The assignments are prepared with <a href="https://www.R-exams.org">R/exams</a> and administered in our university’s learning management system (OpenOlat).</p> <p>Recently, I have started to use <a href="https://chat.openai.com/chat">ChatGPT</a> to create those questions and found it a useful - yet imperfect - tool. Below, I show how I create a question on the income elasticity of demand with ChatGPT and what further steps I take to turn it into an R/exams question with some shuffling and randomization.</p> <p>Naturally, the illustrative example I use comes from economics but the same strategy can also be applied for creating knowledge quiz questions in other fields.</p> <h2 id="step-1-elicit-the-answer-list-from-chatgpt">Step 1: Elicit the answer list from ChatGPT</h2> <p>In general, I don’t ask ChatGPT to come up with the question but provide the question myself. But that’s pretty much it. What I ask for is a list of correct and incorrect answers.</p> <p>Note that I ask for more than one correct answer, despite creating a single-choice question, because I can use R/exams’ built-in shuffling to select a different correct answer for different test-takers. Similarly, I ask for more incorrect answers than I need for each test-taker in order to apply some subsampling and shuffling. The same strategy can also be leveraged for multiple-choice questions.</p> <p><strong>Prompt:</strong> <em>Create seven correct and seven incorrect answers for an exam in introductory economics based on the following question: Which of the following statements about income elasticity of demand are correct?</em></p> <blockquote> <p>Correct answers:</p> <p><span style="color:#3B3B3B;background-color:#66CE7040">A) If the income elasticity of demand is positive, it is called a normal good.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">B) Income elasticity of demand measures the extent to which demand for a good responds to a change in income.</span><br /> <span style="color:#3B3B3B;background-color:#DAB54440">C) Luxury goods typically have a higher income elasticity of demand than necessities.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">D) If the income elasticity of demand is negative, it is called an inferior good.</span><br /> <span style="color:#3B3B3B;background-color:#FF97AF40">E) Income elasticity of demand can vary between zero and infinity.</span><br /> <span style="color:#3B3B3B;background-color:#FF97AF40">F) A Giffen good is a special case of an inferior good in which demand increases as income decreases.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">G) An income elasticity of demand of one means that demand for the good increases proportionally to the change in income.</span></p> <p>Incorrect answers:</p> <p><span style="color:#3B3B3B;background-color:#66CE7040">H) Income elasticity of demand measures the extent to which demand for a good responds to a change in price.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">I) If the income elasticity of demand is positive, it is called an inferior good.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">J) Income elasticity of demand is the same for all goods.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">K) If the income elasticity of demand is zero, it is called a luxury good.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">L) If the income elasticity of demand is greater than one, it is called a normal good.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">M) Income elasticity of demand is the same for all consumers.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">N) Income elasticity of demand is independent of the price of the good.</span></p> </blockquote> <h2 id="step-2-review-answers-potentially-modify-the-prompt">Step 2: Review answers, potentially modify the prompt</h2> <p>Above, I have color-coded the suggested answers. Green means I am okay with the answer being categorized as correct/incorrect. Yellow means it’s not necessarily incorrect but imprecise or ill-crafted. Red means definitely incorrect.</p> <p>For answer C), ChatGPT seems to conflate the term “luxury good” in everyday language and economics, where luxury goods are defined by having an income elasticity larger than one.</p> <p>Answer E) is incorrect, as the income elasticity can be negative. But this will make for a nice answer in the incorrect list.</p> <p>Answer F) is incorrect because a Giffen good is a good for which demand increases if its price increases.</p> <p>I decided to ask for more incorrect answers, giving ChatGPT a bit more guidance:</p> <p><strong>Prompt:</strong> <em>Add additional incorrect answer options that include the terms “normal goods” and “Giffen goods.”</em></p> <blockquote> <p>Additional incorrect answers:</p> <p>O) If the income elasticity of demand for normal goods is positive, it is called an inferior good.<br /> P) Giffen goods always have a positive income elasticity of demand.<br /> Q) The income elasticity of demand for Giffen goods cannot be greater than one.<br /> R) If the income elasticity of demand for normal goods is negative, it is called a superior good.<br /> S) If the income elasticity of demand for Giffen goods is negative, demand increases with an increase in income.<br /> <span style="color:#3B3B3B;background-color:#66CE7040">T) Giffen goods are luxury goods for which demand decreases as income increases.</span><br /> <span style="color:#3B3B3B;background-color:#66CE7040">U) Normal goods are goods preferred by a specific segment of the population.</span></p> </blockquote> <p>I decided to use the two answers highlighted in green and added them to the list.</p> <h2 id="step-3-edit-manually">Step 3: Edit manually</h2> <p>In the next step, I edited the answers I was not fully happy with and added my own answers to the list:</p> <p>Correct answers:</p> <ul> <li>If the income elasticity of demand is positive, the good is said to be a normal good.</li> <li>The income elasticity of demand indicates how strongly the demand for a good reacts to a change in income.</li> <li>If the income decreases by 2% and thus the demand for a good decreases by 3%, it is called a luxury good.</li> <li>If the income elasticity of demand is negative, one speaks of an inferior good.</li> <li>The income elasticity of demand can be positive or negative.</li> <li>A Giffen good is a special case of an inferior good where demand increases if the price of the good increases.</li> <li>An income elasticity of demand equal to one means that the demand for the good increases proportional to the change in income.</li> </ul> <p>Incorrect answers:</p> <ul> <li>The income elasticity of demand indicates how strongly the demand for a good responds to a change of the price.</li> <li>If the income elasticity of demand is positive, the good is said to be inferior.</li> <li>The income elasticity of demand is the same for all goods.</li> <li>If the income elasticity of demand is zero, the good is called a luxury good.</li> <li>If the income elasticity of demand is greater than one, the good is called a normal good.</li> <li>The income elasticity of demand is the same for all consumers.</li> <li>The income elasticity of demand is independent of the good’s price.</li> <li>The income elasticity of demand can range between zero and infinity.</li> <li>Giffen goods are luxury goods for which the demand decreases as income increases.</li> <li>Common goods are goods that are purchased preferentially by a certain part of the population.</li> </ul> <h2 id="step-4-implement-in-rexams-format">Step 4: Implement in R/exams format</h2> <p>Finally, let’s turn this into a <a href="https://www.R-exams.org/intro/dynamic/">dynamic R/exams exercise</a> in both R/Markdown (Rmd) and R/LaTeX (Rnw) format. The first version of the exercise, linked in the table below, simply lists all answer alternatives from Step 3, flags them as correct/incorrect in the <code class="language-plaintext highlighter-rouge">exsolution</code> meta-information, specifies <code class="language-plaintext highlighter-rouge">extype</code> as <code class="language-plaintext highlighter-rouge">schoice</code> for single-choice, and sets <code class="language-plaintext highlighter-rouge">exshuffle</code> to 5 so that one correct and 4 incorrect answer alternatives are randomly selected.</p> <p>The second version in the table below is virtually identical to the first one, but <code class="language-plaintext highlighter-rouge">extype</code> is now set to <code class="language-plaintext highlighter-rouge">mchoice</code> for multiple-choice. In this case five answer alternatives are chosen randomly with at least one correct and at least one incorrect alternative.</p> <table> <thead> <tr> <th style="text-align: right">#</th> <th style="text-align: left">Exercise templates</th> <th style="text-align: left">Invert?</th> <th style="text-align: left">Type</th> <th style="text-align: left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: right">1</td> <td style="text-align: left"><a href="https://www.R-exams.org/assets/posts/2023-05-22-chatgpt/income_elasticity1.Rmd">income_elasticity1.Rmd</a> <br /> <a href="https://www.R-exams.org/assets/posts/2023-05-22-chatgpt/income_elasticity1.Rnw">income_elasticity1.Rnw</a></td> <td style="text-align: left">No</td> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">schoice</code></td> <td style="text-align: left">Select single correct answer from shuffled subset of five answer alternatives.</td> </tr> <tr> <td style="text-align: right">2</td> <td style="text-align: left"><a href="https://www.R-exams.org/assets/posts/2023-05-22-chatgpt/income_elasticity2.Rmd">income_elasticity2.Rmd</a> <br /> <a href="https://www.R-exams.org/assets/posts/2023-05-22-chatgpt/income_elasticity2.Rnw">income_elasticity2.Rnw</a></td> <td style="text-align: left">No</td> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">mchoice</code></td> <td style="text-align: left">As in #1 but with one or more correct answer alternatives.</td> </tr> <tr> <td style="text-align: right">3</td> <td style="text-align: left"><a href="https://www.R-exams.org/assets/posts/2023-05-22-chatgpt/income_elasticity3.Rmd">income_elasticity3.Rmd</a> <br /> <a href="https://www.R-exams.org/assets/posts/2023-05-22-chatgpt/income_elasticity3.Rnw">income_elasticity3.Rnw</a></td> <td style="text-align: left">Yes</td> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">schoice</code></td> <td style="text-align: left">As in #1 but randomly vary between selection of correct or incorrect answer.</td> </tr> <tr> <td style="text-align: right">4</td> <td style="text-align: left"><a href="https://www.R-exams.org/assets/posts/2023-05-22-chatgpt/income_elasticity4.Rmd">income_elasticity4.Rmd</a> <br /> <a href="https://www.R-exams.org/assets/posts/2023-05-22-chatgpt/income_elasticity4.Rnw">income_elasticity4.Rnw</a></td> <td style="text-align: left">Yes</td> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">mchoice</code></td> <td style="text-align: left">As in #3 but with one or more (in)correct answer alternatives.</td> </tr> </tbody> </table> <p>In the third and fourth version of the exercise, I add some further dynamic elements to the question in order to create some more random variation and make cheating harder. Specifically, I randomly vary between the original task (Which of the statements is/are correct?) and the inverted task (Which of statements is/are <strong>not</strong> correct?). Moreover, some of the answer alternatives are randomly modified (increase vs. decrease; different percentages) without changing the nature of the statement (correct vs. incorrect).</p> <p>The fourth version again differs from the third only by using the <code class="language-plaintext highlighter-rouge">mchoice</code> (instead of <code class="language-plaintext highlighter-rouge">schoice</code>) type and “are” (instead of “is”) in the question.</p> <p>For more guidance on using the <code class="language-plaintext highlighter-rouge">schoice</code> and <code class="language-plaintext highlighter-rouge">mchoice</code> exercise types in R/exams see the corresponding <a href="https://www.youtube.com/watch?v=XI5xG7Y0hQ0">YouTube tutorial</a> which starts out from a knowledge quiz question about <a href="https://www.R-exams.org/templates/capitals/">capitals</a>.</p> <h2 id="conclusion">Conclusion</h2> <p>Just like it’s not a good idea for students to rely on ChatGPT to answer exam questions, it’s not a good idea to entirely rely on it to create them. Correct answers might be phrased incorrectly, vice versa, or you might find answers to be ill-crafted.</p> <p>But what ChatGPT is very useful for is to give you a set of potential answers, especially incorrect ones, that sound plausible. You can then use this list, use only selected answer options, or modify others. This is what I find most useful at the moment, as it can take a lot of time and cognitive energy to come up with high-quality answer lists from an empty slate.</p>2023-05-22T00:00:00+02:00https://www.R-exams.org/templates/lm3/lm3: Simple Linear Regression (Cloze with Theory, Application, Essay, and File Upload)2022-11-21T00:00:00+01:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/Exercise template with both theory and applied questions, as well as interpretation and code upload, about simple linear regression based on a randomly-generated CSV file.<p>Exercise template with both theory and applied questions, as well as interpretation and code upload, about simple linear regression based on a randomly-generated CSV file.</p> <div class="row t1 b1"> <div class="medium-4 columns"><b>Name:</b></div> <div class="medium-8 columns"><code class="highlighter-rouge">lm3</code></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Type:</b></div> <div class="medium-8 columns"><a href="https://www.R-exams.org/tag/cloze/"><code class="highlighter-rouge">cloze</code></a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Related:</b></div> <div class="medium-8 columns"><a href="https://www.R-exams.org/templates/lm/"><code class="highlighter-rouge">lm</code></a>, <a href="https://www.R-exams.org/templates/lm2/"><code class="highlighter-rouge">lm2</code></a>, <a href="https://www.R-exams.org/templates/gaussmarkov/"><code class="highlighter-rouge">gaussmarkov</code></a></div> </div> <div class="row t20 b1"> <div class="medium-4 columns"><b>Description:</b></div> <div class="medium-8 columns">Cloze with theory and applied questions about linear regression. The theory part uses knowledge questions in "string" and "mchoice" format. The applied part is based on bivariate numeric data for download in a CSV file (comma-separated values) and uses two "num" and one "schoice" item. Additionally, for interpretation, there is an open-ended "essay" element and a "file" upload for the R script used by the participants. This type of extended cloze question is currently supported in QTI 2.1 (OpenOlat in particular).</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Solution feedback:</b></div> <div class="medium-8 columns">Yes</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Randomization:</b></div> <div class="medium-8 columns">Random numbers, data file, and graphics</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Mathematical notation:</b></div> <div class="medium-8 columns">No</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Verbatim R input/output:</b></div> <div class="medium-8 columns">Yes</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Images:</b></div> <div class="medium-8 columns">Yes</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Other supplements:</b></div> <div class="medium-8 columns">linreg.csv</div> </div> <div class="row t20 b1"> <div class="medium-4 columns"><b>Template:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3.Rmd">lm3.Rmd</a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3.Rnw">lm3.Rnw</a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Raw:</b> (1 random version)</div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3.md">lm3.md</a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3.tex">lm3.tex</a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>PDF:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3-Rmd.pdf"><img src="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3-Rmd-pdf.png" alt="lm3-Rmd-pdf" /></a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3-Rnw.pdf"><img src="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3-Rnw-pdf.png" alt="lm3-Rnw-pdf" /></a></div> </div> <div class="row t1 b20"> <div class="medium-4 columns"><b>HTML:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3-Rmd.html"><img src="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3-Rmd-html.png" alt="lm3-Rmd-html" /></a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3-Rnw.html"><img src="https://www.R-exams.org/assets/posts/2022-11-21-lm3//lm3-Rnw-html.png" alt="lm3-Rnw-html" /></a></div> </div> <p><strong>Demo code:</strong></p> <pre><code class="prettyprint ">library("exams") set.seed(403) exams2html("lm3.Rmd") set.seed(403) exams2pdf("lm3.Rmd") set.seed(403) exams2html("lm3.Rnw") set.seed(403) exams2pdf("lm3.Rnw")</code></pre>2022-11-21T00:00:00+01:00https://www.R-exams.org/templates/lm2/lm2: Simple Linear Regression (Cloze with Theory and Application)2022-11-21T00:00:00+01:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/Exercise template with both theory and applied questions about simple linear regression based on a randomly-generated CSV file.<p>Exercise template with both theory and applied questions about simple linear regression based on a randomly-generated CSV file.</p> <div class="row t1 b1"> <div class="medium-4 columns"><b>Name:</b></div> <div class="medium-8 columns"><code class="highlighter-rouge">lm2</code></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Type:</b></div> <div class="medium-8 columns"><a href="https://www.R-exams.org/tag/cloze/"><code class="highlighter-rouge">cloze</code></a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Related:</b></div> <div class="medium-8 columns"><a href="https://www.R-exams.org/templates/lm/"><code class="highlighter-rouge">lm</code></a>, <a href="https://www.R-exams.org/templates/gaussmarkov/"><code class="highlighter-rouge">gaussmarkov</code></a>, <a href="https://www.R-exams.org/templates/lm3/"><code class="highlighter-rouge">lm3</code></a></div> </div> <div class="row t20 b1"> <div class="medium-4 columns"><b>Description:</b></div> <div class="medium-8 columns">Cloze with theory and applied questions about linear regression. The theory part uses knowledge questions in "string" and "mchoice" format. The applied part is based on bivariate numeric data for download in a CSV file (comma-separated values) and uses two "num" and one "schoice" item.</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Solution feedback:</b></div> <div class="medium-8 columns">Yes</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Randomization:</b></div> <div class="medium-8 columns">Random numbers and data file</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Mathematical notation:</b></div> <div class="medium-8 columns">No</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Verbatim R input/output:</b></div> <div class="medium-8 columns">Yes</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Images:</b></div> <div class="medium-8 columns">No</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Other supplements:</b></div> <div class="medium-8 columns">linreg.csv</div> </div> <div class="row t20 b1"> <div class="medium-4 columns"><b>Template:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2.Rmd">lm2.Rmd</a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2.Rnw">lm2.Rnw</a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Raw:</b> (1 random version)</div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2.md">lm2.md</a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2.tex">lm2.tex</a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>PDF:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2-Rmd.pdf"><img src="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2-Rmd-pdf.png" alt="lm2-Rmd-pdf" /></a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2-Rnw.pdf"><img src="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2-Rnw-pdf.png" alt="lm2-Rnw-pdf" /></a></div> </div> <div class="row t1 b20"> <div class="medium-4 columns"><b>HTML:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2-Rmd.html"><img src="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2-Rmd-html.png" alt="lm2-Rmd-html" /></a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2-Rnw.html"><img src="https://www.R-exams.org/assets/posts/2022-11-21-lm2//lm2-Rnw-html.png" alt="lm2-Rnw-html" /></a></div> </div> <p><strong>Demo code:</strong></p> <pre><code class="prettyprint ">library("exams") set.seed(403) exams2html("lm2.Rmd") set.seed(403) exams2pdf("lm2.Rmd") set.seed(403) exams2html("lm2.Rnw") set.seed(403) exams2pdf("lm2.Rnw")</code></pre>2022-11-21T00:00:00+01:00https://www.R-exams.org/templates/essayreg2/essayreg2: Linear Regression (Cloze with Essay and File Upload)2022-11-18T00:00:00+01:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/Exercise template for interpreting a regression with two explanatory variables based on randomly-generated data (with either a linear, semi-logarithmic, or log-log relationship) in form of a cloze including essay and file upload.<p>Exercise template for interpreting a regression with two explanatory variables based on randomly-generated data (with either a linear, semi-logarithmic, or log-log relationship) in form of a cloze including essay and file upload.</p> <div class="row t1 b1"> <div class="medium-4 columns"><b>Name:</b></div> <div class="medium-8 columns"><code class="highlighter-rouge">essayreg2</code></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Type:</b></div> <div class="medium-8 columns"><a href="https://www.R-exams.org/tag/cloze/"><code class="highlighter-rouge">cloze</code></a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Related:</b></div> <div class="medium-8 columns"><a href="https://www.R-exams.org/templates/essayreg/"><code class="highlighter-rouge">essayreg</code></a></div> </div> <div class="row t20 b1"> <div class="medium-4 columns"><b>Description:</b></div> <div class="medium-8 columns">The results of a linear regression model (linear, semi-logarithmic, or log-log) need to be obtained and interpreted in a "cloze" question. This comprises two "num" elements (R-squared and F-statistic), an open-ended "essay" element for interpreting the model output, and a "file" upload for the R script used by the participants. This type of extended cloze question is currently supported in QTI 2.1 (OpenOlat in particular).</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Solution feedback:</b></div> <div class="medium-8 columns">Yes</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Randomization:</b></div> <div class="medium-8 columns">Random numbers and text blocks</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Mathematical notation:</b></div> <div class="medium-8 columns">No</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Verbatim R input/output:</b></div> <div class="medium-8 columns">Yes</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Images:</b></div> <div class="medium-8 columns">No</div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Other supplements:</b></div> <div class="medium-8 columns">regression.csv</div> </div> <div class="row t20 b1"> <div class="medium-4 columns"><b>Template:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2.Rmd">essayreg2.Rmd</a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2.Rnw">essayreg2.Rnw</a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>Raw:</b> (1 random version)</div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2.md">essayreg2.md</a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2.tex">essayreg2.tex</a></div> </div> <div class="row t1 b1"> <div class="medium-4 columns"><b>PDF:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2-Rmd.pdf"><img src="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2-Rmd-pdf.png" alt="essayreg2-Rmd-pdf" /></a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2-Rnw.pdf"><img src="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2-Rnw-pdf.png" alt="essayreg2-Rnw-pdf" /></a></div> </div> <div class="row t1 b20"> <div class="medium-4 columns"><b>HTML:</b></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2-Rmd.html"><img src="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2-Rmd-html.png" alt="essayreg2-Rmd-html" /></a></div> <div class="medium-4 columns"><a href="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2-Rnw.html"><img src="https://www.R-exams.org/assets/posts/2022-11-18-essayreg2//essayreg2-Rnw-html.png" alt="essayreg2-Rnw-html" /></a></div> </div> <p><strong>Demo code:</strong></p> <pre><code class="prettyprint ">library("exams") set.seed(403) exams2html("essayreg2.Rmd") set.seed(403) exams2pdf("essayreg2.Rmd") set.seed(403) exams2html("essayreg2.Rnw") set.seed(403) exams2pdf("essayreg2.Rnw")</code></pre>2022-11-18T00:00:00+01:00https://www.R-exams.org/general/cran_release_240/New R/exams Version: Improved E-Learning Tools During a Pandemic2022-10-25T00:00:00+02:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/Substantial new release of the R/exams package to CRAN with many new features and enhancements, especially for interfacing e-learning tools and learning management systems during the pandemic.<p>Substantial new release of the R/exams package to CRAN with many new features and enhancements, especially for interfacing e-learning tools and learning management systems during the pandemic.</p> <p><img alt="New R/exams Version: Improved E-Learning Tools During a Pandemic" src="https://www.R-exams.org/images/cran240.title.png" /></p> <h2 id="overview">Overview</h2> <p>The new version 2.4-0 of the <a href="https://www.R-exams.org/">R/exams</a> package has been released on the Comprehensive R Archive Network at <a href="https://CRAN.R-project.org/package=exams">https://CRAN.R-project.org/package=exams</a>. This is the first CRAN release after 2.5 years of very active development. Due to the challenges from distance learning during the pandemic a lot of new features were added and enhancements made, especially for the support of various e-learning tools and learning management systems.</p> <p>Many of changes were prompted by the authors’ own needs (especially in the support of OpenOlat) but also by the many questions on StackOverflow, posts in the R-Forge forum, or tweets and e-mails from users all around the world. In the following the most important features from the update are highlighted. For the full list of changes including technical details and smaller bug fixes, see the <a href="https://CRAN.R-project.org/web/packages/exams/news/news.html">NEWS</a> of the package release. More blog posts are planned for introducing some of the new features in more detail, e.g., cloze exercises and evaluation strategies.</p> <h2 id="facilitated-support-of-utf-8-and-rmarkdown-exercises">Facilitated support of UTF-8 and R/Markdown exercises</h2> <p>Initially, the package relied on Rnw (R/LaTeX) exercises only and optionally supported different encodings for non-ASCII characters, e.g., UTF-8 or latin1 (ISO-8859-1) etc. However, it was cumbersome to correctly set the encoding of input exercises <em>and</em> output file formats.</p> <p>Given that the majority of users by now seem to rely on Rmd (R/Markdown) exercises and that most output file formats involve using the <code class="language-plaintext highlighter-rouge">pandoc</code> document converter (which requires to use UTF-8) for some aspects, the entire <code class="language-plaintext highlighter-rouge">exams</code> package and all its function now exclusively use UTF-8 as well. All templates etc. have been modified to support UTF-8 out-of-the-box. This greatly facilitates working with UTF-8 as there is no need anymore to set any <code class="language-plaintext highlighter-rouge">encoding</code> argument anywhere.</p> <p>Support for all other encodings like ISO-8859-* (latin1, latin9, etc.), which had previously been available for Rnw exercises in certain <code class="language-plaintext highlighter-rouge">exams2xyz()</code> interfaces, has been disabled. This is a slight reduction of functionality but will be a great benefit for most users of the package.</p> <p>Finally, to facilitate working with Rmd exercises and embedded graphics or data files, the packages <code class="language-plaintext highlighter-rouge">base64enc</code>, <code class="language-plaintext highlighter-rouge">knitr</code>, and <code class="language-plaintext highlighter-rouge">rmarkdown</code> are now imported in the package (and not just suggested).</p> <h2 id="open-ended-text-questions-with-text-editor-or-file-upload">Open-ended text questions with text editor or file upload</h2> <p>The processing of <code class="language-plaintext highlighter-rouge">string</code> exercises for learning management systems like Moodle, OpenOlat, or other QTI-based systems has been extended. By default, <code class="language-plaintext highlighter-rouge">string</code> exercises are intended for closed-format short-text answers that have to be matched exactly by the participants (e.g., asking for the name of an R function or exact value of an output string etc.). Additionally, open-ended text answers can now be enabled by setting the <code class="language-plaintext highlighter-rouge">exstringtype</code> meta-information to <code class="language-plaintext highlighter-rouge">essay</code> and/or <code class="language-plaintext highlighter-rouge">file</code>. The former requests a text editor for entering an answer while the latter requests a file upload dialogue. The <a href="https://www.R-exams.org/templates/essayreg/">essayreg</a> exercise has been modified to leverage this new meta-information. Such exercises then have to be evaluated by the instructors/examiners, i.e., there is no automatic evaluation by the learning management system.</p> <p>Similarly, the <code class="language-plaintext highlighter-rouge">exclozetype</code> meta-information now also accepts <code class="language-plaintext highlighter-rouge">essay</code> or <code class="language-plaintext highlighter-rouge">file</code> instead of <code class="language-plaintext highlighter-rouge">string</code> for elements of a <code class="language-plaintext highlighter-rouge">cloze</code> exercise. Currently, the combination of these types with <code class="language-plaintext highlighter-rouge">num</code> or <code class="language-plaintext highlighter-rouge">schoice</code> elements etc. is only possible for QTI-based systems (i.e., OpenOlat in particular) but not for Moodle (whose cloze format does not support open-ended text answers). For illustration, see the new <code class="language-plaintext highlighter-rouge">"essayreg2"</code> and <code class="language-plaintext highlighter-rouge">"lm3"</code> exercise templates.</p> <h2 id="enhancements-for-openolat">Enhancements for OpenOlat</h2> <p>Several enhancements and extensions have been made in <code class="language-plaintext highlighter-rouge">exams2openolat()</code> (or the underlying <code class="language-plaintext highlighter-rouge">exams2qti21()</code> function, respectively). The most important new features are:</p> <ul> <li>Improved processing of the <code class="language-plaintext highlighter-rouge">cutvalue</code> (for passing a test/exam/quiz). By default, this is <code class="language-plaintext highlighter-rouge">cutvalue = NULL</code> (or equivalently <code class="language-plaintext highlighter-rouge">cutvalue = NA</code>) which means that no pass/fail status is computed at all, i.e., only the sum of the points is reported. This is particularly useful if individual online tests during a semester contribute to an overall grade but cannot be passed/failed individually.</li> <li>New argument <code class="language-plaintext highlighter-rouge">navigation = "nonlinear"</code>. This can be switched to <code class="language-plaintext highlighter-rouge">"linear"</code> enforcing that questions in the test must be answered sequentially while the default <code class="language-plaintext highlighter-rouge">"nonlinear"</code> means that participants can switch back and forth between questions.</li> <li>New argument <code class="language-plaintext highlighter-rouge">selection = "pool"</code> that controls how exercises and sections are sampled. By default, the function creates one section for each exercise from which one replication will be selected in the exam. If <code class="language-plaintext highlighter-rouge">selection = "exam"</code> each section contains all questions and one section will be selected for the exam. The <code class="language-plaintext highlighter-rouge">"exam"</code> variant has the advantage that <code class="language-plaintext highlighter-rouge">nsamp</code> can be fully used now and that questions that build on each other can be used in the exam.</li> <li>New argument <code class="language-plaintext highlighter-rouge">shufflesections = FALSE</code> can be set to <code class="language-plaintext highlighter-rouge">TRUE</code> in order to randomly shuffle the order of sections/exercises for each participant. For <code class="language-plaintext highlighter-rouge">selection = "pool"</code> this corresponds to shuffling the sections that contain the pools of exercises. For <code class="language-plaintext highlighter-rouge">selection = "exam"</code> it corresponds to shuffling the exercises within each exam section.</li> <li>New argument <code class="language-plaintext highlighter-rouge">cloze_schoice_display = "auto"</code> that controls the display of <code class="language-plaintext highlighter-rouge">schoice</code> elements in <code class="language-plaintext highlighter-rouge">cloze</code> exercises. By default, radio <code class="language-plaintext highlighter-rouge">"buttons"</code> are used if the answer list appears in its own paragraph and a <code class="language-plaintext highlighter-rouge">"dropdown"</code> menu is used if the answer list appears inline (and has no mathematical markup). Both options can also be enforced explicitly, independently from the answer list appearing in a separate paragraph or inline.</li> <li>The default <code class="language-plaintext highlighter-rouge">stitle</code> (section title) and <code class="language-plaintext highlighter-rouge">ititle</code> (item title) are now <code class="language-plaintext highlighter-rouge">NULL</code> so that items are simply numbered consecutively (1, …, n) and section titles are omitted. Similarly, the default <code class="language-plaintext highlighter-rouge">sdescription</code> is now empty omitting the section description as it is typically not necessary.</li> </ul> <p>The are some additional new arguments that allow further fine control of a test’s configuration. The most important and flexible is the argument <code class="language-plaintext highlighter-rouge">config = TRUE</code>. The logical specification <code class="language-plaintext highlighter-rouge">config = TRUE</code>/<code class="language-plaintext highlighter-rouge">FALSE</code> uses the default configuration or switches off the extra configuration entirely, respectively. Moreover, a list of options like <code class="language-plaintext highlighter-rouge">config = list(cancel = TRUE, scoreprogress = TRUE)</code> can be provided for customizing how OpenOlat renders the QTI 2.1 content, see <code class="language-plaintext highlighter-rouge">?openolat_config</code> for more details.</p> <p>Finally. a new argument <code class="language-plaintext highlighter-rouge">envir</code> has been added that is passed on to <code class="language-plaintext highlighter-rouge">xweave()</code>. By setting this to a common environment, e.g., <code class="language-plaintext highlighter-rouge">envir = .GlobalEnv</code> (or some new dedicated environment), it is possible to re-use variables generated in one exercise in previous exercises, e.g., for creating a sequence of variables based on the same data set. Note that this needs to be combined with <code class="language-plaintext highlighter-rouge">selection = "exam"</code> (see above).</p> <h2 id="enhancements-for-moodle">Enhancements for Moodle</h2> <p>The popular <code class="language-plaintext highlighter-rouge">exams2moodle()</code> interface has been improved, in particular for more flexible <code class="language-plaintext highlighter-rouge">cloze</code> exercises:</p> <ul> <li><code class="language-plaintext highlighter-rouge">mchoice</code> elements in <code class="language-plaintext highlighter-rouge">cloze</code> questions are now properly supported. By default they are shown as <code class="language-plaintext highlighter-rouge">MULTIRESPONSE</code> checkboxes and employ Moodle’s default evaluation strategy where each incorrect box eliminates one correct box. A different evaluation strategy can, in principle, be chosen but Moodle might not process all negative points correctly.</li> <li><code class="language-plaintext highlighter-rouge">schoice</code> elements in <code class="language-plaintext highlighter-rouge">cloze</code> questions are still rendered as <code class="language-plaintext highlighter-rouge">MULTICHOICE</code> drop-down menus by default unless they contain math markup. As this is not rendered by Moodle in drop-down menus, a <code class="language-plaintext highlighter-rouge">MULTICHOICE_V</code> column of radio buttons is used in this case.</li> <li>To allow for customization of both <code class="language-plaintext highlighter-rouge">mchoice</code> and <code class="language-plaintext highlighter-rouge">schoice</code> elements in <code class="language-plaintext highlighter-rouge">cloze</code> questions, the are now both <code class="language-plaintext highlighter-rouge">cloze_mchoice_display</code> and <code class="language-plaintext highlighter-rouge">cloze_schoice_display</code> arguments. This is not fully backward compatible because in previous versions <code class="language-plaintext highlighter-rouge">cloze_mchoice_display</code> was also used to customize <code class="language-plaintext highlighter-rouge">schoice</code> elements. Now a warning is issued in this case.</li> <li>To fix the maximum width of fill-in-the-blank cells in <code class="language-plaintext highlighter-rouge">num</code> and/or <code class="language-plaintext highlighter-rouge">string</code> sub-items (e.g., when presented in a table), arguments <code class="language-plaintext highlighter-rouge">numwidth</code> and <code class="language-plaintext highlighter-rouge">stringwidth</code> have been added to <code class="language-plaintext highlighter-rouge">make_question_moodle()</code>. Alternatively, they can also be specified through <code class="language-plaintext highlighter-rouge">exextra</code> tags in each exercise. See the <a href="https://www.R-exams.org/templates/fourfold2/">fourfold2</a> exercise for an example and <code class="language-plaintext highlighter-rouge">?make_question_moodle</code> for more details.</li> </ul> <p>Moreover, there is a new experimental function <code class="language-plaintext highlighter-rouge">moodle2exams()</code> that can take a Moodle XML quiz file with numeric, multichoice, shortanswer, and essay exercises and convert them to R/exams exercise files, either in Rmd or Rnw format. If the text formatting is more advanced (e.g., containing mathematical notation or tables etc.) the function might not lead to fully satisfactory results but still provide a useful starting point for subsequent manual editing.</p> <h2 id="new-exams2xyz-interfaces">New exams2xyz interfaces</h2> <p>Various new learning management systems or quiz engines can now be interfaced using R/exams. The work on <code class="language-plaintext highlighter-rouge">exams2testvision()</code> and <code class="language-plaintext highlighter-rouge">exams2grasple()</code> was financially supported by the Dutch Ministry of Education, Culture and Science (Project code OL20-06), and the University of Amsterdam.</p> <ul> <li><code class="language-plaintext highlighter-rouge">exams2ilias()</code> for the open-source <a href="https://www.ilias.de/">ILIAS learning management system</a>. This is essentially a convenience wrapper to <code class="language-plaintext highlighter-rouge">exams2qti12()</code>, tweaking a few defaults and employing a somewhat modified XML template. Not all question types are supported, though, mostly string questions with open-ended answers and multiple-choice and single-choice questions. Numeric and cloze questions are not supported, yet.</li> <li><code class="language-plaintext highlighter-rouge">exams2testvision()</code> for the Dutch testing platform <a href="https://www.testvision.nl/en/">TestVision</a>. It is essentially a fork of <code class="language-plaintext highlighter-rouge">exams2qti21()</code> that incorporates TestVision’s own strict implementation of QTI 2.1. See the <a href="https://www.R-exams.org/tutorials/exams2testvision/">online tutorial</a> on how to upload the zip output from <code class="language-plaintext highlighter-rouge">exams2testvision()</code> into the system by selecting it in the import menu and then moving the imported material to the appropriate directories.<br /> Additionally, there is a new function <code class="language-plaintext highlighter-rouge">testvision2exams()</code> to convert TestVision’s QTI 2.1 questions to R/exams exercise files, either in Rmd or Rnw format. The supported TestVision question types are ‘invul (numeriek)’, ‘een-uit-meer’, ‘meer-uit-meer’, and ‘open’ which are converted to <code class="language-plaintext highlighter-rouge">num</code>, <code class="language-plaintext highlighter-rouge">schoice</code>, <code class="language-plaintext highlighter-rouge">mchoice</code>, and <code class="language-plaintext highlighter-rouge">string</code>, respectively.</li> <li><code class="language-plaintext highlighter-rouge">exams2grasple()</code> for <a href="https://www.grasple.com/">Grasple</a>, a Dutch practice platform for mathematics and statistics education. It supports <code class="language-plaintext highlighter-rouge">num</code> and <code class="language-plaintext highlighter-rouge">schoice</code> questions which are exported to a zip file containing <a href="https://github.com/grasple/open-format/blob/main/exercise.schema.json">Grasple’s JSON format</a>. Note that currently importing cannot be done by users themselves; it requires a request for manual import by a Grasple team member.</li> <li><code class="language-plaintext highlighter-rouge">exams2particify()</code> that can export exercises to a comma-separated values (CSV) format for import in the <a href="https://particify.de/">audience response system Particify</a>, the successor to ARSnova. In particular, single-choice and multiple-choice exercises are fully supported while num and string question are converted to open-ended text questions.</li> <li><code class="language-plaintext highlighter-rouge">exams2kahoot()</code> that can export sufficiently simple single-choice and multiple-choice exercises to an Excel sheet via <code class="language-plaintext highlighter-rouge">openxlsx::write.xlsx()</code> that can be imported by the <a href="https://kahoot.com/">game-based learning platform Kahoot!</a> (suggested by Rushad Faridi). Exercises are converted to plain text and questions must not exceed 120 characters, answers must not exceed 75 characters.</li> </ul> <h2 id="enhancements-for-written-exams-nops-format">Enhancements for written exams (NOPS format)</h2> <p>The <a href="https://www.R-exams.org/tutorials/exams2nops/">exams2nops()</a> function is the R/exams interface for generating exams of single-choice and multiple-choice questions, that can be scanned and evaluated automatically.</p> <p>Various improvemens have been made in <code class="language-plaintext highlighter-rouge">nops_scan()</code>, especially for scanning the boxes pertaining to the student registration ID. Rather than reading a very small area around each box and just shaving off its borders, a larger area is read now and then shaved iteratively. Hence, it is also easily possible to further increase the <code class="language-plaintext highlighter-rouge">size</code> of the area which may sometimes lead to improved scanning results.</p> <p>In the <code class="language-plaintext highlighter-rouge">exams2nops()</code> function itself, the handling of <code class="language-plaintext highlighter-rouge">reglength < 7</code> has been improved. Internally, <code class="language-plaintext highlighter-rouge">reglength = 7</code> is still enforced (and thus necessary in the registration CSV file) but the initial IDs are fixed to “0” in the exam sheet and corresponding boxes ticked already.</p> <p>Finally, <a href="https://www.R-exams.org/tutorials/nops_language/">language support</a> has been extended by two new languages: Czech (<code class="language-plaintext highlighter-rouge">cz</code>, by Jindřich Marek) and Galician (<code class="language-plaintext highlighter-rouge">gl</code>, by Marta Sestelo & Nora M. Villanueva).</p> <h2 id="enhancements-for-blackboard">Enhancements for Blackboard</h2> <p>In the <code class="language-plaintext highlighter-rouge">exams2blackboard()</code> interface the new argument <code class="language-plaintext highlighter-rouge">mathjax = NULL</code> has been added that optionally embeds the MathJax <code class="language-plaintext highlighter-rouge"><script></code> in each of the exercises. This allows to render mathematical content by the MathJax plugin for all modern browsers. Without MathJax, the browser itself has to do the rendering directly (which is supported by Firefox and Safari but not by Chrome for example). The default is <code class="language-plaintext highlighter-rouge">FALSE</code> unless <code class="language-plaintext highlighter-rouge">converter = "pandoc-mathjax"</code> is used. But also for the default converters (producing MathML output) <code class="language-plaintext highlighter-rouge">mathjax = TRUE</code> can be used. (Suggested and tested by Sean Quallen and Gabriele Cantaluppi.)</p> <p>Moreover, the following improvements may be useful for Blackboard users: Rendering verbatim code chunks can be fixed from <code class="language-plaintext highlighter-rouge"><pre></code> to <code class="language-plaintext highlighter-rouge"><code></code> tags if <code class="language-plaintext highlighter-rouge">fix_pre = TRUE</code> (default) which is necessary in classical Blackboard systems. Points can be specified through <code class="language-plaintext highlighter-rouge">expoints</code>.</p> <h2 id="further-improvements">Further improvements</h2> <ul> <li>When running exercises via <code class="language-plaintext highlighter-rouge">knitr::knit()</code> errors in the R code will stop the evaluation now by default. This was always the default behavior for Rnw exercises (i.e., when processed with <code class="language-plaintext highlighter-rouge">engine = "sweave"</code>) but now is also the default for Rmd exercises and for Rnw exercises via <code class="language-plaintext highlighter-rouge">engine = "knitr"</code>. In exercises processed via <code class="language-plaintext highlighter-rouge">knitr::knit()</code> it is possible to carry on with code evaluation after errors (the default in <code class="language-plaintext highlighter-rouge">knitr</code>) by setting the chunk option <code class="language-plaintext highlighter-rouge">error = TRUE</code>. Similarly, the default handling of warnings has been set to <code class="language-plaintext highlighter-rouge">warning = FALSE</code> so that warnings are reported on the console rather than in the weaved/knitted exercises.</li> <li>Added new argument <code class="language-plaintext highlighter-rouge">texengine = "pdflatex"</code> to <code class="language-plaintext highlighter-rouge">exams2pdf()</code> which is passed on to <code class="language-plaintext highlighter-rouge">tinytex::latexmk(..., engine = texengine)</code>. Provided that <code class="language-plaintext highlighter-rouge">tinytex</code> support is installed, this option can also be set to <code class="language-plaintext highlighter-rouge">texengine = "xelatex"</code> or <code class="language-plaintext highlighter-rouge">"lualatex"</code> for example.</li> <li>Interfaces <code class="language-plaintext highlighter-rouge">exams2html()</code>, <code class="language-plaintext highlighter-rouge">exams2pdf()</code>, and <code class="language-plaintext highlighter-rouge">exams2pandoc()</code> gained an argument <code class="language-plaintext highlighter-rouge">exshuffle = NULL</code> which can be modified to overrule the <code class="language-plaintext highlighter-rouge">exshuffle</code> setting within an exercise (if any). For example, setting <code class="language-plaintext highlighter-rouge">exams2xyz(..., exshuffle = FALSE)</code> retains the full answerlist without any permutation.</li> <li>In <code class="language-plaintext highlighter-rouge">xexams()</code> a new argument <code class="language-plaintext highlighter-rouge">rds = FALSE</code> was added that indicates whether the list returned by the function should also be saved as an RDS data file. If <code class="language-plaintext highlighter-rouge">rds = TRUE</code> the file name <code class="language-plaintext highlighter-rouge">metainfo.rds</code> is used but alternatively <code class="language-plaintext highlighter-rouge">rds</code> can also be specified as a character file name to be used. The new <code class="language-plaintext highlighter-rouge">rds</code> argument is leveraged in <code class="language-plaintext highlighter-rouge">exams2blackboard()</code>, <code class="language-plaintext highlighter-rouge">exams2moodle()</code>, <code class="language-plaintext highlighter-rouge">exams2pdf()</code>, <code class="language-plaintext highlighter-rouge">exams2html()</code>, <code class="language-plaintext highlighter-rouge">exams2qti12()</code>, and <code class="language-plaintext highlighter-rouge">exams2qti21()</code>, as well as other interfaces built on top of these.</li> </ul>2022-10-25T00:00:00+02:00https://www.R-exams.org/tutorials/exams2learnr/Embedding R/exams Exercises in learnr Tutorials2022-10-24T00:00:00+02:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/Introduction to the new exams2learnr package for including quizzes or individual questions from dynamic exercise templates into learnr tutorials which can be deployed as shiny apps.<p>Introduction to the new exams2learnr package for including quizzes or individual questions from dynamic exercise templates into learnr tutorials which can be deployed as shiny apps.</p> <p><img alt="Embedding R/exams Exercises in learnr Tutorials" src="https://www.R-exams.org/images/exams2learnr.title.png" /></p> <h2 id="overview">Overview</h2> <p>The package <code class="language-plaintext highlighter-rouge">exams2learnr</code> mainly provides the function of the same name, <code class="language-plaintext highlighter-rouge">exams2learnr()</code>. It is an interface for embedding exercises written with <a href="https://www.R-exams.org/">R/exams</a> in tutorials or quizzes written with the <a href="https://rstudio.github.io/learnr/">learnr</a> package.</p> <p>The goal of <code class="language-plaintext highlighter-rouge">learnr</code> is the creation of interactive tutorials in a <a href="https://shiny.rstudio.com/">shiny</a> application written with R/Markdown. The tutorials can contain individual questions (exercises) or quizzes (sets of exercises) along with text, graphics, and other elements you can embed in R/Markdown. Usually, these tutorials can then be used for self-paced learning rather than (summative) assessment.</p> <p>The <code class="language-plaintext highlighter-rouge">exams2learnr()</code> interface leverages <code class="language-plaintext highlighter-rouge">learnr</code>’s capabilities for questions/quizzes to dynamically insert (random variations) from R/exams exercise templates, either written in Rmd (R/Markdown) or Rnw (R/LaTeX) format. Currently, there is support for the following question types:</p> <table> <thead> <tr> <th style="text-align: left">Description</th> <th style="text-align: left">R/exams</th> <th style="text-align: left">learnr</th> </tr> </thead> <tbody> <tr> <td style="text-align: left">Single-choice</td> <td style="text-align: left"><tt>schoice</tt></td> <td style="text-align: left"><tt>learnr_radio</tt></td> </tr> <tr> <td style="text-align: left">Multiple-choice</td> <td style="text-align: left"><tt>mchoice</tt></td> <td style="text-align: left"><tt>learnr_checkbox</tt></td> </tr> <tr> <td style="text-align: left">Numeric</td> <td style="text-align: left"><tt>num</tt></td> <td style="text-align: left"><tt>learnr_numeric</tt></td> </tr> <tr> <td style="text-align: left">Text</td> <td style="text-align: left"><tt>string</tt></td> <td style="text-align: left"><tt>learnr_text</tt></td> </tr> </tbody> </table> <p>Thus, there is no support, yet, for <code class="language-plaintext highlighter-rouge">cloze</code> questions that can combine all of the elements above.</p> <h2 id="first-motivation">First motivation</h2> <p>For quickly trying out how a certain R/exams exercise is rendered in a <code class="language-plaintext highlighter-rouge">learnr</code> tutorial, there is the convenience function <code class="language-plaintext highlighter-rouge">run_quiz()</code>. This sets up a tutorial embedding R/exams exercises in a temporary directory and directly runs the tutorial in a <code class="language-plaintext highlighter-rouge">shiny</code> app. For illustration, the code below creates a quiz containing one random version of each of these exercises that are shipped with the R/exams package: <a href="https://www.R-exams.org/templates/capitals/">capitals</a> (multiple-choice), <a href="https://www.R-exams.org/templates/fruit/">fruit</a> (numeric), <a href="https://www.R-exams.org/templates/function/">function</a> (string/text). A screenshot is included below the code.</p> <pre><code class="language-{r}">library("exams2learnr") run_quiz(c("capitals.Rmd", "fruit.Rmd", "function.Rmd")) </code></pre> <p><a href="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/run_quiz.png"><img src="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/run_quiz.png" alt="Screenshot from `run_quiz()` for exercises `capitals.Rmd`, `fruit.Rmd`, and `function.Rmd`." /></a></p> <p>Thus, the <code class="language-plaintext highlighter-rouge">run_quiz()</code> function is nice for getting a first feeling for what is possible with the <code class="language-plaintext highlighter-rouge">exams2learnr</code> package and for the look & feel of the resulting <code class="language-plaintext highlighter-rouge">shiny</code> apps. For full customization, however, a dedicated Rmd tutorial should be set up. This can then leverage the main <code class="language-plaintext highlighter-rouge">exams2learnr()</code> function to explicitly include questions/quizzes, potentially along with further elements and/or customizations.</p> <h2 id="building-blocks">Building blocks</h2> <p>The main function <code class="language-plaintext highlighter-rouge">exams2learnr()</code> can take one or more exercise templates, either as a vector or as a list, just as for other <code class="language-plaintext highlighter-rouge">exams2xyz()</code> interfaces. By default, this creates a single random replication from (each of) the exercise(s), converts the text to HTML, and wraps it into a suitable <code class="language-plaintext highlighter-rouge">learnr</code> object. For a single exercise a <code class="language-plaintext highlighter-rouge">tutorial_question</code> is returned and for a vector/list of exercises a <code class="language-plaintext highlighter-rouge">tutorial_quiz</code>. These defaults can be modified and further arguments can be passed on to the underlying <code class="language-plaintext highlighter-rouge">learnr</code> function calls to <code class="language-plaintext highlighter-rouge">question()</code> and <code class="language-plaintext highlighter-rouge">quiz()</code>, respectively. This allows for customizing the appearance or controlling whether multiple attempts are allowed, or whether hints/solutions are shown, etc.</p> <p>As a first example, we apply <code class="language-plaintext highlighter-rouge">exams2learnr()</code> to the string/text <a href="https://www.R-exams.org/templates/function/">function</a> exercise, readily provided within the R/exams package. The result is represented as a <code class="language-plaintext highlighter-rouge">learnr_text</code> object, inheriting from <code class="language-plaintext highlighter-rouge">tutorial_question</code>:</p> <pre><code class="language-{r}">qn <- exams2learnr("function.Rmd") class(qn) ## [1] "learnr_text" "tutorial_question" print(qn) ## Question: "What is the name of the R function for extracting the fitted ## log-likelihood from a fitted (generalized) linear model object?" ## type: "learnr_text" ## allow_retry: FALSE ## random_answer_order: FALSE ## answers: ## ✔: "logLik" ## messages: ## correct: "Correct!" ## incorrect: "Incorrect" ## message: "<code>logLik</code> is the R function for extracting the ## fitted log-likelihood from a fitted (generalized) linear model object. ## See <code>?logLik</code> for the corresponding manual page." ## Options: ## trim: TRUE </code></pre> <p>Subsequently, we set up a quiz with the single-choice <a href="https://www.R-exams.org/templates/swisscapital/">swisscapital</a> exercise and the multiple-choice <a href="https://www.R-exams.org/templates/switzerland/">switzerland</a> exercise, represented as <code class="language-plaintext highlighter-rouge">learnr_radio</code> and <code class="language-plaintext highlighter-rouge">learnr_checkbox</code> objects, respectively, contained in a <code class="language-plaintext highlighter-rouge">tutorial_quiz</code>.</p> <pre><code class="language-{r}">qz <- exams2learnr(c("swisscapital.Rmd", "switzerland.Rmd")) class(qz) ## [1] "tutorial_quiz" print(qz) ## Quiz: "Quiz" ## ## Question: "What is the seat of the federal authorities in Switzerland ## (i.e., the de facto capital)?" ## type: "learnr_radio" ## allow_retry: FALSE ## random_answer_order: FALSE ## answers: ## X: "Zurich" ## X: "Basel" ## ✔: "Bern" ## X: "Vaduz" ## X: "Geneva" ## messages: ## correct: "Correct!" ## incorrect: "Incorrect" ## message: "There is no de jure capital but the de facto capital and ## seat of the federal authorities is Bern.</p> ## ## <ul> ## <li>False</li> ## <li>False</li> ## <li>True</li> ## <li>False</li> ## <li>False</li> ## </ul> ## " ## ## Question: "Which of the following statements about Switzerland is correct?" ## type: "learnr_checkbox" ## allow_retry: FALSE ## random_answer_order: FALSE ## answers: ## X: "The currency in Switzerland is the Euro." ## ✔: "Italian is an official language in Switzerland." ## ✔: "The Swiss national holiday is August 1." ## X: "Switzerland is part of the European Union (EU)." ## X: "Zurich is the capital of Switzerland." ## messages: ## correct: "Correct!" ## incorrect: "Incorrect" ## message: "<ul> ## <li>False. The currency is the Swiss Franc (CHF).</li> ## <li>True. The official languages are: German, French, Italian, Romansh.</li> ## <li>True. The establishment of the Swiss Confederation is traditionally dated to August 1, 1291.</li> ## <li>False. Switzerland is part of the Schengen Area but not the EU.</li> ## <li>False. There is no de jure capital but the de facto capital of Switzerland is Bern.</li> ## </ul> ## " </code></pre> <p>If more than <code class="language-plaintext highlighter-rouge">n = 1</code> random replications are produced then a standard list is returned - because <code class="language-plaintext highlighter-rouge">learnr</code> currently does not provide a compound object that can capture a question bank with multiple replications. The list has one element per random replication, each of which is a list of <code class="language-plaintext highlighter-rouge">tutorial_question</code> objects.</p> <p>The format of the return value can also be controlled by the <code class="language-plaintext highlighter-rouge">output</code> argument if the desired format is not selected automatically.</p> <h2 id="tutorial-with-a-quiz">Tutorial with a quiz</h2> <p>For setting up a <code class="language-plaintext highlighter-rouge">learnr</code> tutorial with a quiz based on R/exams exercises the building blocks discussed above can be used. In the YAML header the <code class="language-plaintext highlighter-rouge">output</code> should be <code class="language-plaintext highlighter-rouge">learnr::tutorial</code> and the <code class="language-plaintext highlighter-rouge">runtime</code> should to be <code class="language-plaintext highlighter-rouge">shiny_prerendered</code>. Then the quiz (or “exam”) can be set up as a list of exercise templates, as for other <code class="language-plaintext highlighter-rouge">exams2xyz()</code> interfaces as well. The entire quiz is then prepared in a single <code class="language-plaintext highlighter-rouge">exams2learnr()</code> call. For illustration consider:</p> <pre> --- title: "R/exams quiz" output: learnr::tutorial runtime: shiny_prerendered --- ```{r setup, include = FALSE} ## package and list of various exercises library("exams2learnr") exm <- list( c("swisscapital.Rmd", "capitals.Rmd"), "deriv.Rnw", "deriv2.Rnw", "fruit.Rmd", "boxplots.Rmd", "ttest.Rmd", "function.Rmd" ) ``` ```{r rexams_quiz, echo = FALSE, message = FALSE} exams2learnr(exm, caption = "Please solve the following exercises") ``` </pre> <p>The demo file above is actually shipped as a supplementary file <a href="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/learnr_quiz.Rmd">learnr_quiz.Rmd</a> within the <code class="language-plaintext highlighter-rouge">exams2learnr</code> package. Hence, it can be <code class="language-plaintext highlighter-rouge">run()</code> as in the following command. The screenshot below shows (one random replication of) the first exercises. The concrete exercises will differ in every new <code class="language-plaintext highlighter-rouge">run()</code> of the tutorial.</p> <pre><code class="language-{r}">rmarkdown::run(system.file("learnr", "learnr_quiz.Rmd", package = "exams2learnr")) </code></pre> <p><a href="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/learnr_quiz.png"><img src="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/learnr_quiz.png" alt="Screenshot from the `learnr_quiz.Rmd` tutorial." /></a></p> <h2 id="tutorial-with-individual-questions">Tutorial with individual questions</h2> <p>To finetune the appearance of the R/exams exercises within the <code class="language-plaintext highlighter-rouge">learnr</code> tutorial, e.g., for putting different exercises into different sections, it may be necessary to include each question/exercise individually (rather than an entire quiz). For illustration consider the following Rmd document that is provided as supplementary file <a href="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/learnr_questions.Rmd">learnr_questions.Rmd</a>:</p> <pre> --- title: "R/exams questions" output: learnr::tutorial runtime: shiny_prerendered --- ```{r setup, include = FALSE} library("exams2learnr") ``` ## Knowledge quiz (single-choice) ```{r schoice1, echo = FALSE, message = FALSE} exams2learnr("swisscapital.Rmd", allow_retry = TRUE, incorrect = "Incorrect, try again.") ``` ## Knowledge quiz (multiple-choice) ```{r mchoice2, echo = FALSE, message = FALSE} exams2learnr("capitals.Rmd") ``` ## Arithmetic (numeric) ```{r num3, echo = FALSE, message = FALSE} exams2learnr("deriv.Rnw", allow_retry = TRUE) ``` ## Arithmetic (single-choice) ```{r schoice4, echo = FALSE, message = FALSE} exams2learnr("deriv2.Rnw") ``` ## Multiple-choice with graphic ```{r mchoice5, echo = FALSE, message = FALSE} exams2learnr("boxplots.Rmd") ``` ## Multiple-choice with R output ```{r mchoice6, echo = FALSE, message = FALSE} exams2learnr("ttest.Rmd") ``` ## String question ```{r mchoice7, echo = FALSE, message = FALSE} exams2learnr("function.Rmd", allow_retry = TRUE) ``` </pre> <p>This tutorial also shows how to use some of <code class="language-plaintext highlighter-rouge">learnr</code>’s customization options such as <code class="language-plaintext highlighter-rouge">allow_retry</code> or <code class="language-plaintext highlighter-rouge">incorrect</code>. To <code class="language-plaintext highlighter-rouge">run()</code> this tutorial the command below can be used. As in the previous section, the concrete exercise variations will differ in every new <code class="language-plaintext highlighter-rouge">run()</code> of the tutorial.</p> <pre><code class="language-{r}">rmarkdown::run(system.file("learnr", "learnr_questions.Rmd", package = "exams2learnr")) </code></pre> <p><a href="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/learnr_questions_deriv.png"><img src="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/learnr_questions_deriv.png" alt="Screenshot from the `learnr_questions,Rmd` tutorial (exercise `deriv.Rmd`)." /></a></p> <p><a href="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/learnr_questions_boxplots.png"><img src="https://www.R-exams.org/assets/posts/2022-10-24-exams2learnr/learnr_questions_boxplots.png" alt="Screenshot from the `learnr_questions.Rmd` tutorial (exercise `boxplots.Rmd`)." /></a></p>2022-10-24T00:00:00+02:00https://www.R-exams.org/general/andrewzm_course/Introductory R/exams Course by Andrew Zammit-Mangion2021-02-09T00:00:00+01:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/To help new users to adopt R/exams for generating remote assessments this new free online course covers steps from installation to automatic exam generation in Moodle and PDF format.<p>To help new users to adopt R/exams for generating remote assessments this new free online course covers steps from installation to automatic exam generation in Moodle and PDF format.</p> <p><img alt="Introductory R/exams Course by Andrew Zammit-Mangion" src="https://www.R-exams.org/images/andrewzm_course.title.png" /></p> <p>Due to the requirement to move to remote assessment during the global Covid-19 pandemic, <a href="https://andrewzm.wordpress.com/">Andrew Zammit-Mangion</a> (University of Wollongong, School of Mathematics and Applied Statistics) created introductory materials to help his colleagues to get started with <a href="https://www.R-exams.org">R/exams</a> and turned these into a full online course. The video tutorials in the course show in simple steps how to:</p> <ul> <li>Install the software required to start generating random questions.</li> <li>Code up a simple question and answer.</li> <li>Formulate more complicated Q&As.</li> <li>Export these questions to individual assessment sheets (PDF).</li> <li>Export these questions to Moodle.</li> </ul> <p>The course is hosted on Thinkific and is completely free, just requires registration or a login via a Google account or similar:</p> <div class="thinkific-product-card" data-btn-txt="Enrol here" data-btn-txt-color="#ffffff" data-btn-bg-color="#1b9eea" data-card-type="card" data-link-type="checkout" data-product="961945" data-embed-version="0.0.2" data-card-txt-color="#7d7d7d" data-card-bg-color="#ffffff" data-store-url="https://andrewzm.thinkific.com/embeds/products/show"> <div class="iframe-container"></div> <script type="text/javascript">document.getElementById("thinkific-product-embed") || document.write('<script id="thinkific-product-embed" type="text/javascript"src="https://assets.thinkific.com/js/embeds/product-cards-client.min.js"><\/script>');</script> <noscript><a href="https://andrewzm.thinkific.com/enroll/961945?et=free" target="_blank">Enrol here</a></noscript> </div> <p>The materials are geared somewhat towards assessments containing mathematical exercises but are also easily accessible for users with other backgrounds. Due to the emphasis on mathematical content, the examples in the course are based on Rnw (Sweave) exercises allowing for seamless <a href="https://www.R-exams.org/tutorials/latex">LaTeX</a> integration. Converting the exercises to Rmd (R/Markdown) format is also possible as shown in the <a href="https://www.R-exams.org/tutorials/first_steps/">First steps</a> tutorial but this is not covered in the online course.</p>2021-02-09T00:00:00+01:00https://www.R-exams.org/tutorials/latex/Using LaTeX in R/exams: What, Why, How?2020-11-30T00:00:00+01:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/LaTeX is a document prepration system that is very powerful but can sometimes also be a bit confusing. Hence, some useful details are provided that should help R/exams users getting LaTeX installed and used effectively for preparing exams.<p>LaTeX is a document prepration system that is very powerful but can sometimes also be a bit confusing. Hence, some useful details are provided that should help R/exams users getting LaTeX installed and used effectively for preparing exams.</p> <p><img alt="Using LaTeX in R/exams: What, Why, How?" src="https://www.R-exams.org/images/latex.title.svg" /></p> <h2 id="what">What?</h2> <p><a href="https://latex-project.org/">LaTeX</a> is a software system for document preparation, see the corresponding <a href="https://en.wikipedia.org/wiki/LaTeX">Wikipedia</a> page for an overview. The system encompasses various elements that are important to distinguish:</p> <ul> <li>It uses a <strong>markup language</strong> that can be written in any simple text editor with commands structuring a document (title, sections, etc.), formatting text (italics, bold face, etc.), and providing a powerful mathematical notation.</li> <li>Subsequently, a <strong>TeX engine</strong> can be used to process such a text file and produce an output document that can be viewed, printed, etc. The probably most commonly-used TeX engine is <a href="https://www.tug.org/applications/pdftex/">pdfTeX</a> rendering LaTeX files into PDF documents.</li> <li><strong>TeX distributions</strong> ship collections of such TeX engines along with further utilities, macros, and fonts for processing LaTeX files. The most widely-used TeX distributions are <a href="https://www.tug.org/texlive/">TeX Live</a> available on all major operating systems and <a href="https://miktex.org/">MikTeX</a> for Windows.</li> </ul> <h2 id="why">Why?</h2> <p>In general LaTeX it is very useful for professional typesetting, especially of scientific documents, and is the most widely-used markup language for mathematical notation. However, the complexity of the LaTeX markup language can also be confusing, especially for newcomers, and hence it can be easier to use other markup languages such as <a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a> for many documents. But even when using Markdown as the main markup for a document, LaTeX may still be involved in producing an output document: either only for mathematical notation (e.g., in HTML output) and/or for rendering PDF output. In short, due to its power and flexibility LaTeX is used either explicitly or implicitly in the preparation of a lot of output documents.</p> <p>Consequently, <a href="https://www.R-exams.org">R/exams</a> leverages LaTeX, mainly for three purposes:</p> <ul> <li><strong>As the main markup language for authoring exercises and formatting text in R/LaTeX (Rnw) format.</strong><br /> However, this is optional and the R/Markdown (Rmd) format for authoring exercises is probably more widely used. See the <a href="https://www.R-exams.org/tutorials/first_steps/">First Steps</a> tutorial for a side-by-side comparison.</li> <li><strong>As the markup language for mathematical notation.</strong><br /> This is used in both Rnw and Rmd exercises and can be displayed in various ways. See the <a href="https://www.R-exams.org/tutorials/math/">Mathematical Notation</a> tutorial for some guidance, especially when rendering online exams.</li> <li><strong>As the engine for producing PDF output.</strong><br /> This is also used for both Rnw and Rmd exercises, especially when using <code class="language-plaintext highlighter-rouge">exams2pdf()</code> for flexible, customizable PDF output and <code class="language-plaintext highlighter-rouge">exams2nops()</code> for standardized PDF output that can be <a href="https://www.R-exams.org/tutorials/exams2nops/">automatically scanned and evaluated</a>.</li> </ul> <h2 id="how">How?</h2> <p>If you use R/exams for rendering exercises without mathematical notation into online exams then you likely do not need LaTeX at all (and can stop reading here).</p> <p>If you only use mathematical notation but still only generate online HTML-based exams, especially for e-learning materials, then you need a bit of the markup language but do not actually need to install a TeX engine as part of a TeX distribution.</p> <p>However, when you produce PDF output, be it from Rnw or Rmd exercises, then you need to install a TeX distribution with suitable TeX engines. In case of R/Markdown exercises in Rmd format, R/exams converts the Markdown markup to LaTeX behind the scenes (using the powerful <a href="http://pandoc.org/">pandoc</a> document converter), before using a TeX engine to render the PDF output. The following comments should help you choose an appropriate way to install and interface a TeX distribution when working with R/exams.</p> <p>The TeX distribution providing the TeX engine(s) can either be installed “as usual” on the system, e.g., by downloading MikTeX for Windows or installing TeX Live from a standard repository under Linux or OS X. Alternatively, the R package <a href="https://yihui.name/tinytex/">tinytex</a> offers the possibility for installing a lightweight TeX distribution called “TinyTeX”, based on TeX Live. The latter option is particularly attractive for R/exams users that do not actually use LaTeX for other projects. This is due to a couple of reasons: Everything is handled through R; no special super user rights are needed for the installation; and the installation is minimal with additional style files etc. being installed automatically only if needed. To install the R package <code class="language-plaintext highlighter-rouge">tinytex</code> you just need</p> <pre><code class="language-{r}">install.packages("tinytex") </code></pre> <p>or alternatively use the graphical user interface in RStudio etc. To install the TeX distribution “TinyTeX” you just need</p> <pre><code class="language-{r}">tinytex::install_tinytex() </code></pre> <p>Finally, even when you have installed a TeX distribution (other than TinyTeX) on your system (e.g., TeX Live or MikTeX), the R package <code class="language-plaintext highlighter-rouge">tinytex</code> may (or may not) still be useful for producing PDF exams. Three cases need to be distinguished.</p> <ol> <li> <p><strong>System LaTeX via <code class="language-plaintext highlighter-rouge">tools::texi2dvi()</code></strong><br /> <em>When:</em> The R package <code class="language-plaintext highlighter-rouge">tinytex</code> is <em>not</em> installed or when setting <code class="language-plaintext highlighter-rouge">options(exams_tex = "tools")</code>.<br /> <em>Why:</em> For R/exams users that also use LaTeX for other projects and do not need any further assistance and hence do not need to introduce another dependency in their code.</p> </li> <li> <p><strong>System LaTeX via <code class="language-plaintext highlighter-rouge">tinytex::latexmk()</code></strong><br /> <em>When:</em> The R package <code class="language-plaintext highlighter-rouge">tinytex</code> is installed but not the TinyTeX distribution (and the <code class="language-plaintext highlighter-rouge">exams_tex</code> option is not set to <code class="language-plaintext highlighter-rouge">"tools"</code>).<br /> <em>Why:</em> This tries to resolve some dependencies automatically (e.g., additional style files). Also, it not only supports the <code class="language-plaintext highlighter-rouge">"pdflatex"</code> engine but also <code class="language-plaintext highlighter-rouge">"xelatex"</code> or <code class="language-plaintext highlighter-rouge">"lualatex"</code> etc., which may be useful/necessary for handling certain fonts.</p> </li> <li> <p><strong>TinyTeX via <code class="language-plaintext highlighter-rouge">tinytex::latexmk()</code></strong><br /> <em>When:</em> The R package <code class="language-plaintext highlighter-rouge">tinytex</code> is installed and <code class="language-plaintext highlighter-rouge">tinytex::install_tinytex()</code> was used to install the TinyTeX distribution (and the <code class="language-plaintext highlighter-rouge">exams_tex</code> option is not set to <code class="language-plaintext highlighter-rouge">"tools"</code>).<br /> <em>Why:</em> For users that do not use LaTeX outside of R as it is more lightweight and very easy to install/maintain.</p> </li> </ol>2020-11-30T00:00:00+01:00https://www.R-exams.org/tutorials/exams2testvision/Online Tests for TestVision with R/exams2020-11-23T00:00:00+01:00Niels Smitsn.smits@uva.nlhttp://www.uva.nl/en/profile/s/m/n.smits/n.smits.htmlGenerating, importing, and customizing online tests for TestVision with R/exams.<p>Generating, importing, and customizing online tests for TestVision with R/exams.</p> <p><img alt="Online Tests for TestVision with R/exams" src="https://www.R-exams.org/images/exams2testvision.title.png" /></p> <h2 id="motivation">Motivation</h2> <p>This tutorial illustrates how to use <a href="https://www.R-exams.org">R/exams</a> for creating online exams for <a href="https://www.testvision.nl/en/">TestVision</a>. Testvision is a Dutch commercial online testing company which administers online exams for many universities in the Netherlands. Until now the import of external material from R/exams into TestVision was rather limited, and therefore a new function was necessary.</p> <p>Here, two things are illustrated:</p> <ol> <li>Steps required using R/exams to create tests in TestVision format.</li> <li>Steps required in TestVision online to import these tests in TestVision system.</li> </ol> <p>An accompanying video guide is available on YouTube at <a href="https://www.youtube.com/watch?v=rrpudw2aKVc">https://www.youtube.com/watch?v=rrpudw2aKVc</a>.</p> <p><a href="https://www.youtube.com/watch?v=rrpudw2aKVc"><img src="https://www.R-exams.org/assets/posts/2020-11-23-exams2testvision/exams2testvision.png" alt="exams2testvision" /></a></p> <h2 id="steps-in-r">Steps in R</h2> <h3 id="install-the-package">Install the package</h3> <p>At the moment (November 2020) the <code class="language-plaintext highlighter-rouge">exams2testvision()</code> function is not yet part of the CRAN version of R/exams. For the time being one should use the development version from R-forge. To obtain it, use:</p> <pre><code class="prettyprint ">install.packages("exams", repos = "http://R-Forge.R-project.org")</code></pre> <p>Note that this line of code only needs to be run once, and that after that R/exams is permanently installed on your machine.</p> <h3 id="run-example">Run example</h3> <p>After loading the exams package, we create an exam called <code class="language-plaintext highlighter-rouge">myexam</code> which is a list of exercises. It consists of, respectively, a <a href="https://www.R-exams.org/tag/num/">num</a>, <a href="https://www.R-exams.org/tag/schoice/">schoice</a>, <a href="https://www.R-exams.org/tag/mchoice/">mchoice</a>, <a href="https://www.R-exams.org/tag/string/">string</a>, and <a href="https://www.R-exams.org/tag/cloze/">cloze</a> item.</p> <pre><code class="prettyprint ">library("exams") myexam <- list( "calcmean.Rmd", "tstat2.Rmd", "relfreq.Rmd", "essayreg.Rmd", "boxhist.Rmd" )</code></pre> <p>The first item in the list of exercises, <a href="https://www.R-exams.org/assets/posts/2020-11-23-exams2testvision//calcmean.Rmd">calcmean.Rmd</a> (or alternatively <a href="https://www.R-exams.org/assets/posts/2020-11-23-exams2testvision//calcmean.Rnw">calcmean.Rnw</a> in R/LaTeX format), is a question that is <strong>not</strong> part of the package. It was added to show (a) how a table may be generated, an (b) what this table looks like in TestVision. For things to work this exercise should be saved in the working directory. The remaining exercises do not need to be copied as they are shipped withing the package. For more information on these exercises, see: <a href="https://www.R-exams.org/templates/tstat2/">tstat2</a>, <a href="https://www.R-exams.org/templates/relfreq/">relfreq</a>, <a href="https://www.R-exams.org/templates/essayreg/">essayreg</a>, <a href="https://www.R-exams.org/templates/boxhist/">boxhist</a>.</p> <p>As a first quick check that all exercises work correctly and can be rendered well in a browser, we use the following code (setting a seed for exact reproducibility):</p> <pre><code class="prettyprint ">set.seed(127) exams2html(myexam, converter = "pandoc-mathjax")</code></pre> <p><a href="https://www.R-exams.org/assets/posts/2020-11-23-exams2testvision//testvision.html"><img src="https://www.R-exams.org/assets/posts/2020-11-23-exams2testvision/testvision-html.png" alt="testvision.html" /></a></p> <p>Subsequently, we create the import file for an exam in TestVision.</p> <pre><code class="prettyprint ">set.seed(127) exams2testvision(myexam)</code></pre> <p>In the working directory a zip file called <a href="https://www.R-exams.org/assets/posts/2020-11-23-exams2testvision//testvision.zip">testvision.zip</a> is created, which includes (a) a collection of XML files containing the exercises in TestVision format (based on QTI 2.1) and (b) a directory containing supplementary material, such as images and data files.</p> <h2 id="steps-in-testvision">Steps in TestVision</h2> <h3 id="importing-rexams-output">Importing R/exams output</h3> <p>To import the exams created using R/exams into TestVision the following steps should be performed:</p> <ol> <li>Log in into your institution’s TestVision site.</li> <li>Select ‘Vragen’ (‘Questions’).</li> <li>Select ‘Import’ in the upper left corner.<br /> A pop-up screen called ‘Vragen importeren’ (‘Import questions’) appears .</li> <li>Select the zip-file ‘testvision.zip’ on your computer.</li> <li>Check the option ‘Minder strikte import controle’ (‘less strict import evaluation’).</li> <li>Click ‘OK’. <strong>Uploading may take a while!</strong></li> </ol> <p><em>Comment:</em> Here ‘Minder strikte import controle’ was required because the first exercise contains a table. TestVision has very strict rules for the HTML structure of tables, and when this option is not chosen uploading fails.</p> <h3 id="inspecting-the-exam">Inspecting the exam</h3> <p>Once imported you can take a closer look at the content using ‘Preview’. To permanently import the questions they should be moved to a directory.</p> <ol> <li>Under ‘…’ select ‘Geïmporteerde vragen verplaatsen’ (‘Move imported questions’).</li> <li>Select an appropriate directory and click ‘OK’.<br /> In this directory the questions can be edited and inspected more closely.</li> <li>Select ‘Bewerken’ (‘Edit’) to learn more about the content and settings and/or edit the exercises.</li> </ol> <p>Note that formula content is displayed using a relatively large font size. This is a TestVision issue. Hopefully it will disappear in future versions of the system. For now: The font size can be manually adjusted.</p> <p>To employ the collection of items in a online exam, (a) their status should be changed (from ‘Concept’) into ‘Approved (Aan)’, (b) a new test should be created by selecting ‘Toets’ (‘Test’) in the main menu, and (c) the new items should be included in the new test. For more information see the help function in TestVision.</p> <h2 id="funding">Funding</h2> <p>The work on the <code class="language-plaintext highlighter-rouge">exams2testvision()</code> function, the video tutorial, and this blog are part of the <a href="https://www.sharestats.nl/">ShareStats</a> project, and are financially supported by the Dutch Ministry of Education, Culture and Science (Project code OL20-06), and the University of Amsterdam.</p>2020-11-23T00:00:00+01:00https://www.R-exams.org/general/distancelearning/R/exams for Distance Learning: Resources and Experiences2020-09-22T00:00:00+02:00Achim ZeileisAchim.Zeileis@R-project.orghttps://eeecon.uibk.ac.at/~zeileis/Resources and experiences shared by the R/exams community for supporting distance learning in different learning management systems.<p>Resources and experiences shared by the R/exams community for supporting distance learning in different learning management systems.</p> <p><img alt="R/exams for Distance Learning: Resources and Experiences" src="https://www.R-exams.org/images/distancelearning.title.png" /></p> <h2 id="motivation">Motivation</h2> <p>The COVID-19 pandemic forced many of us to switch abruptly from our usual teaching schedules to distance learning formats. Within days or a couple of weeks, it was necessary to deliver courses in live streams or screen casts, to develop new materials for giving students feedback online, and to move assessments to online formats. This led to a sudden increase in the interest in video conference software (like <a href="https://zoom.us/">Zoom</a>, <a href="https://www.bigbluebutton.org/">BigBlueButton</a>, …), learning management systems (like <a href="https://www.moodle.org/">Moodle</a>, <a href="https://www.instructure.com/canvas/">Canvas</a>, <a href="https://www.openolat.com/">OpenOlat</a>, <a href="https://www.blackboard.com/">Blackboard</a>, <a href="https://www.ilias.de/">ILIAS</a>, …), and - last not least - our <a href="https://www.R-exams.org">R/exams</a> package. Due to the flexible “one-for-all” approach, it was relatively easy for R/exams users who had been using the system for in-class materials to transition to e-learning materials. But also many new R/exams users emerged that were interested in leveraging their university’s learning management system (often Moodle) for their classes (often related to statistics, data analysis, etc.).</p> <p>As distance learning will continue to play an important role in most universities in the upcoming semester, I called for sharing experiences and resources related to R/exams. Here, I collect and summarize some of the feedback from the R/exams community. The full original threads can be found on Twitter and in the R-Forge forum, respectively.</p> <ul> <li><a href="https://twitter.com/AchimZeileis/status/1292774253516001280">Twitter (@AchimZeileis): After a semester of #distancelearning is before the next semester of #distancelearning…</a></li> <li><a href="https://R-Forge.R-project.org/forum/forum.php?thread_id=34019&forum_id=4377&group_id=1337">R-Forge forum: Experiences with R/exams for distance learning</a>.</li> </ul> <h2 id="resources">Resources</h2> <p>Due to the increased interest in R/exams, I contributed various YouTube videos to help getting an overview of the system and to tackle specific tasks (creating exercises or online tests, summative exams, etc.). Also, the many questions asked on StackOverflow and the R-Forge forum led to numerous improvements in the software and support for various typical challenges.</p> <ul> <li>R/exams webinar @ WhyR?: <a href="https://www.youtube.com/watch?v=PnyCR7q4P4Q">YouTube video</a>, <a href="https://www.R-exams.org/general/whyr2020/">blog post</a>.</li> <li>Video tutorials: <a href="https://www.youtube.com/playlist?list=PLsEZAAbioUw1IBnhtBi9eIo0uqMHmqDor">YouTube playlist, Achim Zeileis</a>.</li> <li>Questions & answers: <a href="https://stackoverflow.com/questions/tagged/r-exams">StackOverflow/r-exams</a>, <a href="https://R-Forge.R-project.org/forum/forum.php?forum_id=4377">R-Forge forum</a>.</li> </ul> <p>But in addition to these materials that we developed, many R/exams users stepped up and also created really cool and useful materials. Especially from users in Spain came a lot of interest along with great contributions:</p> <ul> <li>Jonathan Tuke (YouTube video, in English): <a href="https://www.youtube.com/watch?v=yQnIxwTx_PU">Online tests in Canvas.</a>.</li> <li>Julio Mulero (blog post, in Spanish): <a href="https://elultimoversodefermat.wordpress.com/2020/03/29/uso-de-r-para-la-elaboracion-de-cuestionarios-aleatorios-en-moodle/">Online tests in Moodle</a>.</li> <li>Estadística útil (YouTube videos, in Spanish): <a href="https://www.youtube.com/watch?v=nL7iZhFJY1Y">Package</a>, <a href="https://www.youtube.com/watch?v=YXuFFZK1gwE">Installation</a>, <a href="https://www.youtube.com/watch?v=BccEnoS2T6c">First steps</a>, <a href="https://www.youtube.com/watch?v=UmX-RItyyQs">Single choice</a>, <a href="https://www.youtube.com/watch?v=fBIdJGphxGE">Written exams</a>, <a href="https://www.youtube.com/watch?v=6sv71iyYV1U">Moodle exams</a>.</li> <li>Pedro Luis Luque Calvo (YouTube video and blog, in Spanish): <a href="https://www.youtube.com/watch?v=X6dBJmzCAzE">Online tests in Blackboard</a>, <a href="http://destio.us.es/calvo/post/2020-05-01-como-crear-examenes-con-rexams-y-rmarkdown/como-crear-examenes-con-rexams-y-rmarkdown/">blog post</a>.</li> <li>Kenji Sato (blog posts, in Japanese or English): <a href="https://www.kenjisato.jp/post/2020/08/rexams-online-1/">Part 1</a>, <a href="https://www.kenjisato.jp/post/2020/08/rexams-online-2/">Part 2</a>, <a href="https://www.kenjisato.jp/post/2020/09/rexams-online-3/">Part 3</a>, <a href="https://kenjisato.jp/en/post/2020/07/moodle-bordered-table/">bordered tables</a>.</li> <li>Faisal Almalki (YouTube video and supporting materials, in Arabic): <a href="https://www.youtube.com/watch?v=rl64n_wexfY">Online tests in Blackboard</a>, <a href="https://www.R-exams.org/assets/posts/2020-09-22-distancelearning/Almalki.pdf">slides</a>, <a href="https://github.com/falmalki/Rexams_Tutorial/">exercises</a>.</li> </ul> <h2 id="at-universität-innsbruck">At Universität Innsbruck</h2> <p>Not surprisingly, we had been using R/exams extensively in our teaching for a <a href="https://www.R-exams.org/general/uibk_math/">blended learning approach in a Mathematics 101 course (R/exams blog)</a>. The asynchronous parts of the course (screencasts, forum, self tests, and formative online tests) were already delivered through the university’s OpenOlat learning management system. Thus, we “just” had to switch the synchronous parts of the course (lecture, tutorials, and summative written exams) to distance learning formats:</p> <table> <thead> <tr> <th style="text-align: left"> </th> <th style="text-align: left">Learning</th> <th style="text-align: left">Feedback</th> <th style="text-align: left">Assessment</th> </tr> </thead> <tbody> <tr> <td style="text-align: left"><strong>Synchronous</strong></td> <td style="text-align: left">Lecture <br /> Live stream</td> <td style="text-align: left"><em>Previously: Live quiz</em> <br /> <strong>Now: Online test</strong> <br /> (+ Tutorial)</td> <td style="text-align: left"><em>Previously: Written exam</em> <br /> <strong>Now: Online exam</strong></td> </tr> <tr> <td style="text-align: left"><strong>Asynchronous</strong></td> <td style="text-align: left">Textbook <br /> Screencast</td> <td style="text-align: left">Self test <br /> (+ Forum)</td> <td style="text-align: left">Online test</td> </tr> </tbody> </table> <p>The most challenging part was the <a href="https://www.R-exams.org/tutorials/openolat_exam/">summative online exam (R/exams blog)</a> but overall everything worked out reasonably ok. One nice aspect was that other colleagues profited immediately from using a similar approach for their online exams as well. Like my colleague <a href="http://www.lisalechner.com/">Lisa Lechner</a> from the Department of Political Science:</p> <blockquote> <p>Lisa Lechner: R/exams was a life-saver during the difficult semester we faced. I used it for the statistics lecture with approx. 300 students (final online exam, but also ARSnova questions) and for a smaller course on empirical methods in political science. But even before the pandemic, R/exams increased the fairness of my final exams and reduced the time spent on evaluating results. #bestRpackage2020</p> </blockquote> <h2 id="replacing-written-exams">Replacing written exams</h2> <p>Finding a suitable replacement for the summative written exams was not only a challenge for us. One concern that came up several times was that learning management systems like Moodle might not be reliable enough for online exams, especially if students’ internet connections were flaky. Hence, one idea that was discussed, especially with <a href="https://www.nicebread.de/">Felix Schönbrodt</a> and <a href="https://freakonometrics.github.io/">Arthur Charpentier</a>, was to e-mail <a href="https://stackoverflow.com/questions/62392297/create-fillable-pdf-form-with-exams2nops">fillable PDF forms (StackOverflow Q&A)</a> to students <a href="https://twitter.com/freakonometrics/status/1293985139089911820">instead of relying entirely on Moodle (Twitter)</a>. However, I could convince them that PDF forms would create more problems than they solve (see the linked threads above for more details):</p> <blockquote> <p><a href="https://twitter.com/nicebread303/status/1294213560923455489">Felix Schönbrodt @nicebread303</a>: We thought about doing a (pseudo-written) PDF-exam, but we are very glad that we followed @AchimZeileis advice to go for Moodle. Grading is so much easier!</p> </blockquote> <p>Another concern is, of course, cheating, no matter which format the exams use. Many R/exams users recommended to use open-ended questions and/or more complex cloze questions forcing participants to interact with a certain randomized problem, e.g., based on a randomized data set. As <a href="https://prof.beuth-hochschule.de/groemping/">Ulrike Grömping</a> reports, this can also be combined with online proctoring for moderately-sized exams.</p> <blockquote> <p><a href="https://R-Forge.R-project.org/forum/forum.php?thread_id=34019&forum_id=4377&group_id=1337">Ulrike Grömping (R-Forge)</a>: I have also run online exams via Moodle in real time, supervised in a video conference […]. And I have not used auto correction, but have asked questions that also require free text answers from students (text fields with arbitrary correct answer of (e.g.) 72 characters in a cloze exercise). Of course, the solutions support my manual correction process.</p> </blockquote> <p>Other approaches to tackling this problem can be found in the <a href="https://R-Forge.R-project.org/forum/forum.php?thread_id=34019&forum_id=4377&group_id=1337">R-Forge thread</a>, see e.g., the contribution by Niels Smits.</p> <h2 id="moodle-vs-other-learning-management-systems">Moodle vs. other learning management systems</h2> <p>While overall there is a lot of heterogeneity in the learning management systems that the R/exams community uses, Moodle is clearly the favorite. Moodle quizzes also have their quirks but they are surprisingly flexible and can be used at various levels.</p> <blockquote> <p><a href="https://twitter.com/LinXEric/status/1300750949368164352">Eric Lin @LinXEric</a>: I use #rexams extensively, have been for years. I used to do paper exams. Now, with distance learning, I’m serving up exams, quizzes, entry ticket questions, exit ticket questions, all using a #rexams with #moodle.</p> </blockquote> <p>Especially, the cloze question format is popular, allowing to combine multiple-choice, single-choice, numeric, and string items.</p> <blockquote> <p><a href="https://R-Forge.R-project.org/forum/forum.php?thread_id=34019&forum_id=4377&group_id=1337">Rebecca Killick (R-Forge)</a>: We moved to using this exclusively for our undergraduate quizzes in the summer of 2019 and this served us well when COVID-19 hit. We are now expanding our online assessment using R/exams. We mainly use cloze questions with randomization.</p> </blockquote> <p>See also the tweet by <a href="https://twitter.com/emilopezcano/status/1292955475579932672">Emilio L. Cano @emilopezcano</a>.</p> <p>Of course, other learning management systems are also very powerful with Blackboard and Canvas probably being second and third in popularity. The OpenOlat system, also used at our university, is less popular but in various respects even more powerful than Moodle. The support of the QTI 2.1 standard (question and test interoperability) allows to specify a complete exam, including random selection of exercises, randomized order of questions, and flexible cloze questions.</p> <h2 id="collaborating-with-colleagues">Collaborating with colleagues</h2> <p>One design principle of R/exams is that each exercise is a separate file. The motivation behind this is to make it easy to distribute work on a question bank among a larger group before someone eventually compiles a final exam from this question bank. Hence it’s great to see that various R/exams users report that they work on the exercises together with their colleagues, e.g., <a href="https://twitter.com/fernando_mayer/status/1293483065243832322">Fernando Mayer @fernando_mayer on Twitter</a> or:</p> <blockquote> <p><a href="https://twitter.com/ilapros/status/1292825732897476611">Ilaria Prosdocimi @ilapros</a>: used by me and colleagues in Venice for about 500 exams via Moodle (in different basic stats courses). Mostly single choice and numeric questions. After some initial learning it worked perfectly and made the whole exam writing much easier.</p> </blockquote> <p>For facilitating their collaboration, the group around Fernando Mayer has even created a <a href="http://shiny.leg.ufpr.br/fernandomayer/rexams/">ShinyExams interface (in Portuguese)</a>.</p> <h2 id="statistics--data-science-vs-other-fields">Statistics & data science vs. other fields</h2> <p>It is not unexpected that the majority of the R/exams community employs the system for creating resources for teaching statistics, data science, or related topics. See the tweets and posts by <a href="https://twitter.com/FDechterenko/status/1293500357046403072">Filip Děchtěrenko @FDechterenko</a>, <a href="https://twitter.com/BrettPresnell/status/1308209477687152641">@BrettPresnell</a>, <a href="https://twitter.com/statsgen/status/1292952412206972928">Emi Tanaka @statsgen</a>, <a href="https://twitter.com/visnut/status/1273445677482119168">Dianne Cook @visnut</a>, and <a href="https://stuartlee.org/2020/06/17/teaching-during-a-pandemic/">Stuart Lee</a>. In many cases such courses are for students from other fields, such as pharmacy as reported by <a href="https://twitter.com/faolmath/status/1292879192854601728">Francisco A. Ocaña @faolmath</a> or biology as reported by:</p> <blockquote> <p><a href="https://twitter.com/OwenPetchey/status/1284062358709641217">@OwenPetchey</a>: The Data Analysis in Biology course at University of Zurich, with 300 students this spring, used this fantastic resource to author its final exams, with upload to OLAT.</p> </blockquote> <p>However, there is also a broad diversity of other fields/topics, e.g., international finance and macroeconomics (<a href="https://twitter.com/kamromero/status/1292782321075130368">Kamal Romero @kamromero</a>), applied economics and accounting (<a href="https://twitter.com/LinXEric/status/1300750949368164352">Eric Lin @LinXEric</a>), econometrics (Francisco Goerlich), linguistics (Maria Paola Bissiri), <a href="https://www.R-exams.org/general/uibk_soilmechanics/">soil mechanics</a> (Wolfgang Fellin), or programming (John Tipton).</p> <h2 id="going-forward">Going forward</h2> <p>All the additions, improvements, and bug fixes in R/exams that were added over the last month are currently only available in the <a href="https://R-Forge.R-project.org/R/?group_id=1337">development version of R/exams 2.4-0 on R-Forge</a>. The plan is to also release this version to CRAN in the next weeks.</p> <p>Another topic, that will likely become more relevant in the next months as well, is the creation of interactive self-study materials outside of learning-management systems, e.g., as part of an online tutorial. <a href="http://www.sunymaritime.edu/faculty/science/debbie-yuster">Debbie Yuster</a> nicely describes such a scenario:</p> <blockquote> <p><a href="https://R-Forge.R-project.org/forum/forum.php?thread_id=34019&forum_id=4377&group_id=1337">Debbie Yuster (R-Forge)</a>: I plan to use R/exams to maintain source files for “video quizzes” students will take after they watch lecture videos asynchronously in my Introduction to Data Science course. Instructors at different universities will be using these videos (created by the curriculum author), and I will distribute the quizzes to interested faculty, each of whom may have a different preferred delivery mode. I’ll be giving the quizzes through my LMS (Canvas), while others may administer the quizzes in learnr, or use a different LMS. With R/exams, I can maintain a single source, and instructors can convert the quizzes into their preferred format.</p> </blockquote> <p>Two approaches that are particularly interesting are <a href="https://github.com/rstudio/learnr">learnr (RStudio)</a>, that uses R/Markdown with shiny, and <a href="https://github.com/psyteachr/webex">webex (psyTeachR project)</a>, that uses more lightweight R/Markdown with some custom Javascript and CSS. Some first proof-of-concept code is avaiable for a <a href="https://R-Forge.R-project.org/forum/forum.php?thread_id=34001&forum_id=4377&group_id=1337">learnr interface (R-Forge)</a> and <a href="https://stackoverflow.com/questions/62315622/using-r-exams-in-bookdown-document-especially-for-html-output">integrating webex exercises in Markdown documents (StackOverflow Q&A)</a> but more work is needed to turn this into full R/exams interfaces.</p>2020-09-22T00:00:00+02:00