Getting started with Shiny – R web application package

Shiny is a package for building interactive web applications to visualize and play around with data without any knowledge of JavaScript or HTML.

To get started with it, we first need to install R and within the R terminal – the shiny package. I will be using Ubuntu 12.04 as my operating environment.

Installing R

For Shiny to work, R version should be >=2.15.x. The latest version of R is 3.0.0. released in April 2013. For details on the latest version, refer Upgrading to 3.0.0.

 $ sudo add-apt-repository ppa:marutter/rrutter
 $ sudo apt-get update
 $ sudo apt-get install r-base r-base-dev

For more details on installing R, refer Installing R in Ubuntu.

If you had installed R previously and have upgraded to the version provided by the PPA, you might refer Moving to 3.0.0 on Ubuntu. Also, you need to rebuilt all the installed packages. Use

 $ sudo R
 > update.packages(checkBuilt=TRUE)

The first command opens the R terminal with super user permissions required to install packages. This process will take a while depending on the number of packages installed on your R system. If any package installation returned a non-zero exit status, install it separately by

 > install.packages('package_name') 

Installing Shiny

Once R is installed/upgraded, go to the terminal and type

 > install.packages('shiny')

Checking installation success

To check installation status for the package, first close the R terminal by Ctrl+D. This is to exit the terminal with superuser permissions. Open the R terminal by simply typing R in the Ubuntu terminal. Then, run the following commands in the newly opened R terminal:

 > library(shiny)  # To include package shiny in the session
 > runExample("01_hello")  # Running the Hello Shiny Example

This should open a browser with the Hello Shiny! example –

shiny-eg-1

That’s it! You have successfully installed Shiny and are now running your first application. To know more, go through the tutorial provided by RStudio (see Reference).

References
Shiny Tutorial
CRAN Package Shiny
RStudio IDE

Matter over Mind in Machine Learning

Love the points made by the writer based on Dr. Kiri Wagstaff’s paper – Machine Learning that Matters

The Official Blog of BigML.com

I am fortunate enough to have had a number of conversations with Dr. Kiri Wagstaff of NASA’s JPL on a number of occasions (you might as well get the jokes about “not having to be a rocket scientist to understand machine learning” out of the way right now).

Matter over Mind in Machine Learning

Wagstaff is a brilliant scientist.  On top of that, and fortunately for all of us, she works very “close to the data”, using her machine learning expertise to solve important problems that directly impact people other than machine learning researchers.  This closeness to the data is somewhat rare among machine learning experts but is becoming more and more common.  Our own chief scientist Tom Dietterich is a pioneer in computational sustainability and ecosystem informatics.  Another acquaintance of mine, Rayid Ghani, left a lucrative position at Accenture Research to head up President Obama’s vaunted data analytics team.

At the 2012…

View original post 1,231 more words

Advice to a Young Scientist – E.W. Dijkstra

Here are some of the most inspiring quotes from “Advice to a Young Scientist” by E.W.D:
Image

  •  Raise your standards as high as you can live with, avoid wasting your time on routine problems, and always try to work as closely as possible at the boundary of your abilities. Do this because it is the only way of discovering how that boundary should be moved forward. (Rule 1)
  • We all like our work to be socially relevant and scientifically sound. If we can find a topic satisfying both desires, we are lucky; if the two targets are in conflict with each other, let the requirement of scientific soundness prevail. (Rule 2)
  • Never tackle a problem of which you can be pretty sure that (now or in the near future) it will be tackled by others who are, in relation to that problem, at least as competent and well-equipped as you are. (Rule 3)
  •  Write as if your work is going to be studied by a thousand people.
  • Don’t get enamored with the complexities you have learned to live with (be they of your own making or imported). The lurking suspicion that something could be simplified is the world’s richest source of rewarding challenges.
  • Before embarking on an ambitious project, try to kill it.
  • Remember that research with a big R is rarely mission-oriented and plan in terms of decades, not years. Resist all pressure —be it financial or cultural— to do work that is of ephemeral significance at best.
  • Don’t strive for recognition (in whatever form): recognition should not be your goal, but a symptom that your work has been worthwhile.
  • Avoid involvement in projects so vague that their failure could remain invisible: such involvement tends to corrupt one’s scientific integrity.
  • Striving for perfection is ultimately the only justification for the academic enterprise; if you don’t feel comfortable with this goal —e.g. because you think it too presumptuous— stay out!

Original PDF

The first three points are also The Three Golden Rules for Successful Scientific Research.