Quantcast
Channel: Wei Luo » Home
Browsing all 14 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

R to JSON for D3.js and Protovis

D3.js and Protovis use the file format JSON to hold input data. In particular, the most natural format is an array of JSON objects, such as [ { "Petal.Width" : 0.2, "Species" : "setosa" }, {...

View Article



Image may be NSFW.
Clik here to view.

Rotated EPS from R in LaTeX

When it comes to figures in LaTeX, I usually generate figures in pdf format and use pdflatex to compile LaTeX with the pdf figures included. But sometimes a conference or a journal only accept figures...

View Article

Image may be NSFW.
Clik here to view.

Comparing Dashboard Software: Part 1 (Filled Map)

Tableau Filled map is not supported by default in the current version of Tableau (6.1, see this post in the Tableau). However, it can be implemented through the Polygon Mark (see for example here). The...

View Article

Image may be NSFW.
Clik here to view.

Resolving contradictory gender information

In biomedical data analysis, it is conventional to standardize the quantity of interest by age and gender. When the data is the result of merging multiple sources, some subjects of interest may have...

View Article

Image may be NSFW.
Clik here to view.

When did C-section get popular?

C-section birth has a long history. But when did it get really popular? I generated this simple plot comparing the number births on a weekday and the number on a Saturday or Sunday. We can infer that...

View Article


Image may be NSFW.
Clik here to view.

How to create CMYK images for journal publications?

Many journals require color figures to be in CMYK format. If you are not doing this over and over again, here is a quick and dirty way to do it, assuming that you are a Windows user. 1. Create your RGB...

View Article

Image may be NSFW.
Clik here to view.

How to tell if the R session you are running is 64 bit or 32 bit?

Under Windows, here is a simple hack to find out whether you are running a 64 bit or 32 bit R. Type the command version in the prompt. If you see arch           x86_64, then it is 64 bit. Otherwise, it...

View Article

Image may be NSFW.
Clik here to view.

Circumvent Skype’s unable to add contact problem

In my workplace, the internet connection is through a proxy server. With Skype, I was able to talk to people in my contact list, but I was not able to add new contact. The problem and some solutions...

View Article


Image may be NSFW.
Clik here to view.

Similar functions in R and Matlab

Although R and Matlab have many similarities, switching between the two languages is not always easy. Below is a lookup table that hopefully will make the process easier. Matlab R Note size dim find...

View Article


Image may be NSFW.
Clik here to view.

Lightweight http daemons for Windows and Mac

As a Dropbox user, I often need to start a web server from a non-standard root folder location. Under Windows, I have been using Mongoose and loves it. Mongoose is a single .exe file that can be put...

View Article

Image may be NSFW.
Clik here to view.

Estimating the intensity of ward admission and its effect on emergency...

Abstract Emergency department access block is an urgent problem faced by many public hospitals today. When access block occurs, patients in need of acute care cannot access inpatient wards within an...

View Article

Image may be NSFW.
Clik here to view.

Rank 1 update to Cholesky factorization in R

Rank 1 update can be achieved in Matlab with the built-in function cholupdate(). More details about the function can be found here: http://www.mathworks.com.au/help/matlab/ref/cholupdate.html In R, the...

View Article

Image may be NSFW.
Clik here to view.

Override a non-generic method in S3 OOP system

In R OOP, you can override a generic method for your custom class. For example, you can define print() and plot() methods for an class Foo. It is also easy to overrisk a non-generic method if you use...

View Article


Image may be NSFW.
Clik here to view.

Detecting contaminated birthdates using generalized additive models

Background Erroneous patient birthdates are common in health databases. Detection of these errors usually involves manual verification, which can be resource intensive and impractical. By identifying a...

View Article
Browsing all 14 articles
Browse latest View live




Latest Images