A progress indicator for code blocks in org-mode

A progress indicator for code blocks in org-mode courtesy
of John Kitchin:

;; give us some hint we are running
(defadvice org-babel-execute-src-block (around progress nil activate)
  (set-face-attribute
   'org-block-background nil :background "LightSteelBlue")
  (message "Running your code block")
  ad-do-it
  (set-face-attribute 'org-block-background nil :background "gray")
  (message "Done with code block"))

Ultra-lightweight-reproducibility for R: which version of R that you used

Here is another post from the realm of ultra-lightweight-reproducibility for R:

If are going to get serious about locking down your system then only let it run
on the version of R that you personally used to obtain your results!

It takes very, very little effort:

stopifnot(R.version$major==3 && R.version$minor==1.1)

99% of the time, using a newer version won’t matter, but make it crystal clear
both to yourself and your collaborators how you obtained your results, at least
when it comes to which version of R that you used.

Clean and easy string manipulation with stringr for R

Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks. R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they lag behind the string operations in other programming languages, so that some things that are easy to do in languages like Ruby or Python are rather hard to do in R. The stringr package aims to remedy these problems by providing a clean, modern interface to common string operations.

See also http://cran.r-project.org/web/packages/stringr/index.html.

How Yoga Makes You A Fill-In-The-Blank Person

After doing some practice you will surely think that yoga is making you a fill in the blank person. If you don’t think it, then you will read it. If you don’t read it then someone will tell you it. That is OK.

Just know that it isn’t making into anything!

Rather, it is helping you return to that which you already are.

A database on your desktop?

If your business users utilize data that is critical to their success then you need to help provide a pleasant way for them to manage that data. GUI tabular data management programs like MS Excel and LibreOffice or OpenOffice are obvious choices for their ease of use alone. In practice, that ease of use is guaranteed to cause problems for them down the road, and usually at horrible times. Wondering what is a good option if you just stuck with CSV data, I posted here. The replies were informative and helpful, and my take away is that the best option for managing tabular data, if you are not bound to the applications mentioned above, is to use a database… no surprise. How do you do that though while still making it easy for the business and at a reasonable cost? The answer is SQLite.

It uses files that you may share and version. It is a real RBDMS. It runs on every OS. There are graphical management tools. It works well with R.

In practice, there are important details, and it is great to know that there is a realistic and practical solution to manage those details.

sqldf for R

sqldf brokers your dataframe from R into a SQLite database, executes your SQL query, and brokers the data back as a new dataframe. Very nice. The documentation and literature reveals that it works with H2, MySQL, and PostgreSQL, and additionally does a whole lot more than the one-liner claims!