<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/interactive-rtutor-problemsets-via-rstudio-cloud/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://feedproxy.google.com/~r/skranz_R/~3/RtBlOaVCIgY/RTutor_Shiny_Cloud.html"> Economics and R - R posts</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>I just learned about RStudio Cloud (see <a rel="nofollow" href="https://rstudio.cloud/" target="_blank">https://rstudio.cloud/</a>) that allows to simply run RStudio instances from your browser. Moreover, you can simply set-up RStudio projects that other users can simply copy and use themselves. RStudio Cloud is still in alpha and currently one can freely register to use it.</p>
<p>I have set up a project that allows you to simply test and create an interactive RTutor problem set. Just click on the following link:</p>
<p><a rel="nofollow" href="https://rstudio.cloud/project/39040" target="_blank">https://rstudio.cloud/project/39040</a></p>
<p>You are first asked to sign-up to RStudio Cloud or to sign-in via your Google or Github account. Then you see a running instance of RStudio in your browser. You can look at the <code>README.md</code> file or directly open the file <code>Intro.Rmd</code> from the file pane to solve an RMarkdown based interactive problem set directly in RStudio.</p>
<p><img src="https://i2.wp.com/skranz.github.io/images/rcloud1.PNG?w=456" data-recalc-dims="1"></p>
<p>This problem set is a simple introduction to R that is typically the first problem set in my courses at <a rel="nofollow" href="https://www.uni-ulm.de/en/" target="_blank">Ulm University</a> before additional problem sets focus on the topics of the course.</p>
<p>The RMarkdown file <code>Intro.Rmd</code> contains several chunks, in which the student shall enter some code. One can check the solution via <code>Addins -> Check Problemset</code> and get hints for the current chunk by typing <code>hint()</code> in the R console. One also sees how many exercises have already been solved by typing <code>stats()</code> and can earn awards that are shown by <code>awards()</code>.</p>
<p>Nowadays there exists a lot of great ways to learn R in such an interactive fashion, like the web-based <a rel="nofollow" href="https://www.datacamp.com/?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Data Camp courses</a> or <a rel="nofollow" href="http://swirlstats.com/" target="_blank">Swirl</a> that is mainly based on direct input into the R console. Yet, to the best of my knowledge <a rel="nofollow" href="https://github.com/skranz/RTutor" target="_blank">RTutor</a> is still unique by allowing to interactively work through RMarkdown files directly in RStudio. Hence, students can learn in the same environment that they probably use later in their own data science projects.</p>
<p>The file <code>Intro_sol.Rmd</code> in the subdirectory <code>ps_source</code> contains the source code used to generate this problem set.</p>
<p><img src="https://i1.wp.com/skranz.github.io/images/rcloud3.PNG?w=456" data-recalc-dims="1"></p>
<p>This is basically a sample solution of the problem set. RTutor is able to automatically generate hints and tests of the student’s input from such a sample solution. It is also possible to customize hints and specify options how the student’s solution shall be checked. You can modify <code>Intro_sol.Rmd</code> to generate your own RTutor problem set, which you can host on your modified copy of my RStudio Cloud instance. <a rel="nofollow" href="https://github.com/skranz/RTutor/blob/master/vignettes/Guide_for_Developing_Interactive_R_Problemsets.md" target="_blank">This vignette</a> offers more details on how to create RTutor problem sets.</p>
<p>RTutor also offers the opportunity to show and solve problem sets in shiny based format in the browser, as in the following screenshot:</p>
<p><img src="https://i2.wp.com/skranz.github.io/images/rcloud2.PNG?w=456" data-recalc-dims="1"></p>
<p>You can use the shiny based version also from the RStudio Cloud instance by simply typing in the R console:</p>
<div>
<div>
<pre><code><span>library</span><span>(</span><span>RTutor</span><span>)</span><span>
</span><span>show.ps</span><span>(</span><span>&quot;Intro&quot;</span><span>,</span><span> </span><span>user.name</span><span>=</span><span>&quot;TestUser&quot;</span><span>)</span><span>
</span></code></pre>
</div>
</div>
<p>Several of my students at Ulm University have created very nice nice, shiny-based RTutor problem sets based on empirical research articles in economics. The problem sets are hosted on shinyapps.io and Github. Short descriptions of a some of these problem sets are given on my blog<br>
<a rel="nofollow" href="http://skranz.github.io/" target="_blank">http://skranz.github.io</a> and a list of these problem sets is on the RTutor Github page: <a rel="nofollow" href="https://github.com/skranz/RTutor" target="_blank">https://github.com/skranz/RTutor</a></p>
<p>In my courses, I let students solve RTutor problem sets in the RMarkdown format, however. After having solved a problem set, a student can create a submission file with the command <code>make.submission()</code> and upload it to the Moodle page of my course. At the end of the course, I download a big ZIP file of all submission and automatically grade the problem sets based on the R code here: <a rel="nofollow" href="https://github.com/skranz/RTutor/blob/master/grading/grade_sub.r" target="_blank">https://github.com/skranz/RTutor/blob/master/grading/grade_sub.r</a>.</p>
<p>Currently, in my courses all students install RStudio and RTutor locally on their computer. This works, but sometimes it can be a bit time consuming to get the software work on every computer given heterogeneous operating systems and the fact that not every student is very IT savvy. RStudio Cloud looks like a great alternative if one wants to avoid local installation for each student. Of course, in how far that is a long-run viable option will depend on the pricing system RStudio will choose after the test phase and whether you have an available budget for it.</p>
<p>By the way, if you have generated your own RTutor problem set and would like to share it, you can send me an email (email address is on <a rel="nofollow" href="https://www.uni-ulm.de/mawi/mawi-wiwi/institut/mitarbeiter/skranz/" target="_blank">my website</a>) with a link to your Github repository or RStudio Cloud project. It would be great to have a list of external RTutor problem sets.</p>
<p><img width="1" alt="" src="http://feeds.feedburner.com/~r/skranz_R/~4/RtBlOaVCIgY" height="1"></p>
	<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://feedproxy.google.com/~r/skranz_R/~3/RtBlOaVCIgY/RTutor_Shiny_Cloud.html"> Economics and R - R posts</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/q__vgUqFL_Y" height="1"></a></div>