Publications by Lee Pang
One app, three languages
This past week at work I had the opportunity to code the same algorithm using each of the three scientific programming/scripting languages I’m familiar with:MatlabPythonRThe list above is the order that the (re)-coding was done and serves as a beginning of an answer as to why I had|wanted to do such repetitive work.Before getting in...
5079 sym
RegEx: Named Capture in R
I consider myself a decent RegEx user. References to famous quotes about RegEx aside, I find it intuitive, like its speed and that it makes my code simple (more so than the alternative anyhow). Thus, I use RegEx where I can in the growing grab bag of languages I consider myself proficient in:*nix command line / shell scriptsJavascri...
3307 sym R (885 sym/4 pcs)
Excel Import into R without rJava
In my ongoing quest to webappify various R scripts I discovered that rApache cannot load any R packages that depend on rJava. For several of the scripts that I’ve written that grab data out of MS Excel files, and therein use the xlsx package, this is a serious brick wall.In my current workaround, I’ve resorted to using a shell s...
1111 sym
Making rApache load rJava
Here at work I’ve been in the business of developing webapps using R as the backend computational framework. The list of parts to get this running is pretty lightweight, just:R Apache 2rApacheI’m not going to cover how to set these things up here, there is pretty good documentation around the web and on rApache’s site. Inste...
3395 sym
Making Color Ramps in Matlab
When visualizing an array of data in a heatmap, a good color map makes a world of difference.Thanks to my work in ‘omics (i.e. transcriptomics – microarrays and RNASeq) I’ve looked at a lot of heatmaps over the past couple of years, and generated quite a few to boot. Back in my Matlab heavy grad school days, I was generally ha...
3254 sym R (146 sym/3 pcs)
My Job Just Got Shiny-er
Today I went to the RStudio site to post a feature request. I noticed up in the top navigation a link called “Shiny“. I like things that are shiny. It turns out Shiny is a new package the RStudio team has developed for easily making reactive web applications from R code.One of the tools I built at my current job is a web app...
1740 sym 2 img
A copper toned publication!
At long last (1.5yrs since the first submission attempt to be exact), the research I worked on as a post-doctoral fellow has been published!Click on the image above to head over to the article for some light reading. A lot of work went into this paper, and there are many to thank who don’t appear in the author list – basically e...
936 sym 2 img
Set operations on more than two sets in R
ProblemSet operations are a common place thing to do in R, and the enabling functions in the base stats package are:intersect(x, y)union(x, y)setdiff(x, y)setequal(x, y)That said, you’ll note that each ONLY takes two arguments – i.e. set X and set Y – which was a limitation I needed to overcome recently.Googling around I found that you can ...
2224 sym 1 tbl
PID Control-R
On a whim, I thought it might be fun to try to implement a PID control algorithm … in R.Yes, I know I have a strange idea of fun.BackgroundPID control is a heuristic method of automatically controlling processes as wide ranging as water levels in tanks to the direction of ships running against a current. What’s important is that...
5240 sym 8 img
Non-Linear Curve Fitting is Nature Publication Worthy?
Someone needs to explain to me why this is a Nature publication …Granted it is Nature Protocols which started its publication run when I was in grad school and is likely less high-impact as full blown Nature. Seriously tough – using the Solver Add-in in Excel to do non-linear curve fitting gets published? If a younger version...
1106 sym R (277 sym/1 pcs) 2 img