I've made a small tutorial with the learnr package (+ gradethis) in R. The buttons for the tutorial are currently in english (e.g. submit answer, run code). Since my tutorial is in Dutch, it'd be better if the buttons were also in Dutch.
Does anyone know if there's any way to change the button language? And possibly also change the language of the praise given by the gradeR package.
Thanks in advance!
Related
I found several screenshots of R code like I show below, on Twitter and sometimes on Facebook. I wonder how people do it, because it can use also in Powerpoint or Beamer presentations. The code in the following screenshots are irrelevant for this question, I'm only wandering how to prepare or stylised those.
Thanks.
These are usually generated via third-party services such as Carbon. It's pretty straight-forward and you can customize all kinds of things like background color and code highlighting.
Feel free to check out their About section and their GitHub.
Question: is there an easy way to toggle show/hide text in learnr tutorials? I know that you can use code folding in rmarkdown to show/hide code but what I'd like to do is have a "show answer" which then shows a paragraph explaining something. Quite often I find with teaching statistics that I want a student to have a look at something and think about it, and then see if what they think agrees with what I think. A toggle show/hide text (or just show hidden text) would be really handy.
Not really great with css and totally at sea with javascript so if possible an explanation for a 3-year old would be appreciated :-)
Any advice gratefully received.
D'oh! Putting this here in case anyone else is looking for it
<details><summary>Click here for explanation</summary
Some text
</details>
That does exactly what I needed.
I have a personal Wordpress page and plan to post lisp codes. By default Wordpress does not support code highlighter for lisp. Any recommendations?
I've been using Google Code Prettify with a custom version of lang-lisp.js. It's been working great so far.
For an example usage, see a random Lisp-related article pulled from my archives.
I've been using a combination of Syntaxhighlighter Evolved for general highlighting and a slightly modified version of Brian Carper's brush for Clojure. Brian also has a nice color scheme that matches pretty closely the coloring I use in emacs.
You can always use gist which has an option to be embedded in any html page.
I'm looking to create a static dashboard viewable in a web browser. And I'd like to create something like what Stephen Few does in his book Information Dashboard Design. (see example at bottom)
Ggplot2: Shouldn't be any issue producing the graphs below, right?
Dashboard Layout: Is grid suitable? Or should I lay things out in html/css?
If grid can do this easily enough, do you know of any good resources for learning how to us it? I've read the manual but I'm not finding it too helpful. I've seen the LearnR blog's ggplot2 sales dashboard (it uses grid) and I'm having trouble understanding the grid and layout part of things.
dasboard sample http://img251.imageshack.us/img251/1029/fewciodashboard800.png
See http://learnr.wordpress.com/2009/04/09/ggplot2-sales-dashboard/ for an example with code.
I think your html/css-direction might be a really smart move.
It might be easier to get an awesome layout using using Open Office draw and just link to the images, checking off the link box when insterting them for the first time. Open Office supports export to pdf making it usefull for reporting.
Even if it was straight forward to programaticly create a stunning document layout in R, I'm not sure it would be worth the time and effort.
Regards
I would suggest also having a look at the brew package, as in this example on the learnr blog.
A few years later, there are options available for dashboards and layouts with R.
For making grids in R, ggplot2's facet_wrap and facet_grid are excellent.
Shiny allows you to make web apps and dashboards with R. Shiny handles the HTML, CSS, and JavaScript for you. It's on CRAN.
To use ggplot2 to make an interactive Shiny dashboard with d3.js, you can connect to Plotly's ggplot2 figure converter. Here is a tutorial with code examples. Your published apps let you zoom, toggle, filter, pan, and see data on the hover, e.g.:
Disclaimer: I'm on the Plotly team.
alt text http://imgkk.com/i/Fmtd8B.jpg
This is how they look in vista. They are glossier than the normal buttons and when the mouse is not over them they are flat. They have a correspondent version on Windows XP. Is there a way to get them using wxPython?
You can always make a custom button which can look same or better
see my answer to your other question
Custom Button
Get the wxpython docs package from http://www.wxpython.org/download.php
and check out the examples.
Andrea Gavana's agw library, which is included with wxpython now, has a couple of custom widgets called AquaButton and Gradient button both which look very nice. These may work or you may be able to adapt them to suit, they're pure python so you shouldn't have hard time modifying them.