Articles by Lee Pang

Desktop DeployR

April 13, 2016 | 0 Comments

I'm going to be giving a talk this Thursday at my local R/Data Science Meetupabout my method for deploying self contained desktop R applications. Since my original post on the subject (over 2 years ago!) I've made manyof improvements thanks to the many useful comments I received and my own "... [Read more...]

Desktop DeployR

April 13, 2016 | 0 Comments

I'm going to be giving a talk this Thursday at my local R/Data Science Meetupabout my method for deploying self contained desktop R applications. Since my original post on the subject (over 2 years ago!) I've made manyof improvements thanks to the many useful comments I received and my own "... [Read more...]

Paging Widget for Shiny Apps

October 21, 2015 | 0 Comments

In my last post I described how I built a shiny application called “DFaceR” that used Chernoff Faces to plot multidimensional data. To improve application response time during plotting, I needed to split large datasets into more manageable “pages” to be plotted. Rather than take the path of least resistance ... [Read more...]

Paging Widget for Shiny Apps

October 21, 2015 | 0 Comments

In my last post I described how I built a shiny application called “DFaceR” that used Chernoff Faces to plot multidimensional data. To improve application response time during plotting, I needed to split large datasets into more manageable “pag... [Read more...]

Facing your data

October 10, 2015 | 0 Comments

A few years ago, I came across a post on FlowingData about using Chernoff Faces as a fun way to visualize multidimensional data: __ The assumption is that we can read people's faces easily in real life, __ so we should be able to recognize small differences when they represent data. __ Now ... [Read more...]

Facing your data

October 10, 2015 | 0 Comments

A few years ago, I came across a post on FlowingData about using Chernoff Faces as a fun way to visualize multidimensional data: __ The assumption is that we can read people's faces easily in real life, __ so we should be able to recognize small di... [Read more...]

Easy error propagation in R

January 22, 2015 | 0 Comments

In a previous post I demonstrated how to use R’s simple built-in symbolic engine to generate Jacobian and (pseudo)-Hessian matrices that make non-linear optimization perform much more efficiently. Another related application is Gaussian error propagation. Say you have data from a set of measurements in variables x and ... [Read more...]

R OOP – a little privacy please?

August 23, 2014 | 0 Comments

As of late, I’ve been making heavy use of Reference Classes in R. They are easier for me to wrap my mind around since they adopt a usage style more like “traditional” OOP languages like Java. Primarily, object methods are part of the class definition and accessed via the ... [Read more...]

Optimizing with R expressions

August 21, 2014 | 0 Comments

I recently discovered a powerful use for R expression()’sSay you are trying to fit some experimental data to the following nonlinear equation: Ky0eu(x−tl)K+y0(eu∗(x−tl)−1)+b1+(b0−b1)e−kx+b2x with the independent variable x using nlminb() as the minimization optimizer.... [Read more...]

Deploying Desktop Apps with R

April 2, 2014 | 0 Comments

(Update) Despite the original publish date (Apr 1), this post was not and April Fools joke. I’ve also shortened the title a bit. As part of my job, I develop utility applications that automate workflows that apply more involved analysis algorithms. When feasible, I deploy web applications as it lowers ... [Read more...]

An R flaw: unexpected attribute droppings

February 6, 2014 | 0 Comments

Today I was putting some code together that made plots from slices of a 3-dimensional array object aa. A couple of the dimensions in aa had names defined by named vectors. For example: __ aa = array(runif(2*3*4), dim=c(2,3,4), dimnames=list(id = c(good='id1', evil='id2'), x = c(1,2,3), ... [Read more...]

character handling: mean() vs sd()

October 21, 2013 | 0 Comments

Here’s a weird R error/bug/nuance I came across today: What would you expect the following lines of code to return? x = c('1', '2', '3')mean(x)sd(x) Well, apparently it is: # mean(x)[1] NA# sd(x)[1] 1 So, sd() silently converts its input ... [Read more...]

RegEx: Named Capture in R (Round 2)

October 9, 2013 | 0 Comments

Previously, I came up with a solution to R's less than ideal handling of named capture in regular expressions with my re.capture() function. A little more than a year later, the problem is rearing its ugly - albeit subtly different - head again. I now... [Read more...]

mfg, mfcol, mfrow, and layout() – secret friends

August 26, 2013 | 0 Comments

I was working on an issue (enhancement) today in my groan R-package today that required adding additional plotting elements via lines() and points() to a device that had already been partitioned by layout(). The code I wanted to use was essentially: #... [Read more...]

Groan – my first R package

August 20, 2013 | 0 Comments

Being one of two R experts at my current job I figured I should be familiar with package development. Frankly, I've been procrastinating on this topic since I started using R in 2007 - I was doing just fine with source() and the section of the R manua... [Read more...]

A new R trick … for me at least

August 3, 2013 | 0 Comments

What were going to be talking about today are dynamic argument lists for functions. Specifically, how to unpack and prepare them in R using ..., list(), and do.call()Biased by Matlab and varargin Initially, I based my use of ... in R on my experience w... [Read more...]

Non-Linear Curve Fitting is Nature Publication Worthy?

February 27, 2013 | 0 Comments

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 So... [Read more...]

PID Control-R

February 8, 2013 | 0 Comments

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 tan... [Read more...]

Set operations on more than two sets in R

February 6, 2013 | 0 Comments

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 ... [Read more...]

A copper toned publication!

January 21, 2013 | 0 Comments

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 ... [Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)