Author: Feng Li

Set fonts size in R plot
You probably have discovered that R usually gives you different size of fonts in different figures. That is because a numerical value (cex in par function) giving the amount by which plotting text and symbols is magnified relative to a default value. This starts as ‘1’ when a device is opened, and is reset when…

A fast routine of making a commutation matrix
R does not have this function by default, so I wrote a faster routine K() to create a commutation matrix.We always use the notation of commutation matrix on the paper. But when we put it into practice, we typically need the result of a dense matrix by pre or postmultiplied by a commutation matrix. i.e.,…