<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/fruit-image-based-systems-of-linear-equations-numeric/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.r-exams.org/templates/fruit/"> R/exams</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Exercise template for solving a system of three linear equations (numeric answer) with a problem description based on shuffled images.</p>
<div>
<div><b>Name:</b></div>
<div><code>fruit</code></div>
</div>
<div>
<div><b>Type:</b></div>
<div><a rel="nofollow" href="http://www.r-exams.org/tag/num/" target="_blank"><code>num</code></a></div>
</div>
<div>
<div><b>Related:</b></div>
<div><a rel="nofollow" href="http://www.r-exams.org/templates/fruit2/" target="_blank"><code>fruit2</code></a></div>
</div>
<div>
<div><b>Description:</b></div>
<div>A system of three linear equations has to be solved and the solution has to be entered into a fourth equation. However, the system is not defined through a verbal description or mathermatical notation but through images (clip art of tropical fruits). The problem can be interpreted as prices of three fruits (banana, orange, pineapple) and corresponding fruit baskets with different combinations of fruits. Images are stored in Base64 encoding within the exercise files and embedded dynamically into the output. PDFs are best generated from the Rnw version, HTML is best generated with pandoc from either the Rmd version (where pandoc is used by default) or the Rnw version (where ttm is used by default, but pandoc can be easily used as well.)</div>
</div>
<div>
<div><b>Solution feedback:</b></div>
<div>Yes</div>
</div>
<div>
<div><b>Randomization:</b></div>
<div>Random numbers, shuffled graphics</div>
</div>
<div>
<div><b>Mathematical notation:</b></div>
<div>Yes</div>
</div>
<div>
<div><b>Verbatim R input/output:</b></div>
<div>No</div>
</div>
<div>
<div><b>Images:</b></div>
<div>Yes</div>
</div>
<div>
<div><b>Other supplements:</b></div>
<div>No</div>
</div>
<div>
<div><b>Template:</b></div>
<div><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-05-15-fruit//fruit.Rnw" target="_blank">fruit.Rnw</a></div>
<div><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-05-15-fruit//fruit.Rmd" target="_blank">fruit.Rmd</a></div>
</div>
<div>
<div><b>Raw:</b> (1 random version)</div>
<div><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-05-15-fruit//fruit.tex" target="_blank">fruit.tex</a></div>
<div><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-05-15-fruit//fruit.md" target="_blank">fruit.md</a></div>
</div>
<div>
<div><b>PDF:</b></div>
<div><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-05-15-fruit//fruit-Rnw.pdf" target="_blank"><img alt="fruit-Rnw-pdf" src="https://i0.wp.com/www.r-exams.org/assets/posts/2018-05-15-fruit//fruit-Rnw-pdf.png?w=456" data-recalc-dims="1"></a></div>
<div><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-05-15-fruit//fruit-Rmd.pdf" target="_blank"><img alt="fruit-Rmd-pdf" src="https://i1.wp.com/www.r-exams.org/assets/posts/2018-05-15-fruit//fruit-Rmd-pdf.png?w=456" data-recalc-dims="1"></a></div>
</div>
<div>
<div><b>HTML:</b></div>
<div><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-05-15-fruit//fruit-Rnw.html" target="_blank"><img alt="fruit-Rnw-html" src="https://i0.wp.com/www.r-exams.org/assets/posts/2018-05-15-fruit//fruit-Rnw-html.png?w=456" data-recalc-dims="1"></a></div>
<div><a rel="nofollow" href="http://www.r-exams.org/assets/posts/2018-05-15-fruit//fruit-Rmd.html" target="_blank"><img alt="fruit-Rmd-html" src="https://i2.wp.com/www.r-exams.org/assets/posts/2018-05-15-fruit//fruit-Rmd-html.png?w=456" data-recalc-dims="1"></a></div>
</div>
<p><em>(Note that the HTML output contains mathematical equations in MathML. It is displayed by browsers with MathML support like Firefox or Safari – but not Chrome.)</em></p>
<p><strong>Demo code:</strong></p>
<pre><code>library(&quot;exams&quot;)

set.seed(1090)
exams2html(&quot;fruit.Rnw&quot;)
set.seed(1090)
exams2pdf(&quot;fruit.Rnw&quot;)

set.seed(1090)
exams2html(&quot;fruit.Rmd&quot;)
set.seed(1090)
exams2pdf(&quot;fruit.Rmd&quot;)</code></pre>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.r-exams.org/templates/fruit/"> R/exams</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/8Bco_ERagN0" height="1"></a></div>