Showing posts with label R. Show all posts
Showing posts with label R. Show all posts

Thursday, February 20, 2014

How to Install Shiny Server on OSX

I want to set up the shiny-server to run on an iMac at work so that we can run multiple R-apps over the intranet. According to the docs for Shiny server, OSX is not supported yet (version 1.1.0) so we are going to build it from source and hope for the best!

Instructions for building from source are here. We follow them pretty closely but there are a few gotchas.

The full HowTo is on our GitHub Wiki, here

Monday, September 16, 2013

Creating a Mountain Lion development environment

So I had to set up a new dev environment at work on Mountain Lion. It uses the following components

  • Hombrew
  • Python 2.7.5
  • Django 1.5.2
  • Apache 2.2.25
  • Postgres 9.2.4
  • R 3.0.1
  • Virtualenv
and a bunch of other python libraries and stuff. This system is set up for Bioinformatics development, so there are things that are specific to that. The build is documented on our internal wiki, but I copied the build instructions to the *new* code.ex(python) wiki in my personal github account. The direct link to the build instructions is here.

Thursday, July 25, 2013

Understanding R plot margins

Came across this great VISUAL explanation of the differences between margins (mar) and outer margin (oma) regions. This is very helpful.

How to subset RPy2 dataframe

This example demonstrates how to create subsets of RPy2 data frames using single or multiple criteria. I also wanted to test if using Github Gist is a better way the display code snippets on this blog than using Bloggers formatting tools.

And linked gist is here

Thursday, December 16, 2010

Density plots in R

To plot the distribution of scores in R using the density function, use

plot(density(dat$scores))
To overlay scores for another variable onto the first plot, use

lines(density(dat$other_scores), col="red")
Simple enough!