Publications by Yu-Sung Su

Link C with R

07.08.2008

I should have posted this earlier. In my previous post, I have discussed the speed issue in R briefly. The speed issue unfortunately are two of the shortcomings of R. The other one is that R does not handle big data set very well. So instead of waiting for R to improve, for those who cannot wait (me included), we have to go back ...

809 sym

Group-level variances and correlations

23.09.2008

This is just a sum-up of what we should do when we try to estimate the group-level variances and correlations but the software failed to do so. As a R and lmer() user, I found this happens often.If this is the case, there are three potential problems:(1) sd is 0(2) some correlations are -1 or 1(3) covariance matrix is singularIf th...

810 sym

The most popular programming languages in 2008

26.10.2008

TIOBE has released the newest ranking for the most popular programming language here. Java remains the top popular programming language. C and C++ follow with Java. I dont’ see R in this ranking. Maybe it doesn’t belong to this group! Maybe I should devote more of my time learning the other lanugages. I have discussed the ratio...

756 sym

Plotting Math in R

29.10.2008

Plotting math in R can be acheived using the expression(). To know detailed usage, in R console,demo(plotmath)But expression() is not flexible when you want to plot math symbols and parameters altogether. In this case, we use bquote() which is actually a wraper for substitute() and quote(). It has the ability to do paste() and expre...

1270 sym

Plot symbols in R

18.11.2008

In the plot environment, the “pch” parameter decides the symbol of your output. There are about 130 symbols hard coded and passed into “pch.”However, there are still some symbols that are not in these 130 pch’s. For instance, there is no checkmark. To plot checkmark or other symbols, we can use symbol() in the expression...

813 sym

RWinEdt and Windows Vista/Window 7

01.01.2009

As a R user, I like to use RWinEdt as the text editor. I write code on it and send code to R by clicking buttons.I had a spare laptop from Jennifer. It does not have a working screen. I use that to test all kinds of software and OS systems. Recently, I gave up trying to use Fedora (Linux OS). Simply because I do not have enough k...

813 sym

Install JAGS and rjags in Fedora

23.01.2009

JAGS was developed to help those non-Window users to be able to use BUGS. However, I found it is very hard to install JAGS and its R package-rjags. Here is my note on how to install JAGS and rjags in Fedora 10. The note here should work for all Linux systems.Compile JAGS1. Download JAGS source code from JAGS website into any folder...

813 sym

Runing R in the Command Mode in the Window system

29.01.2009

Just when I am about to convert myself into a Linux user, I found this. Running R in the command mode in the Window system is much faster. Here is a simple test:in the Window interface:> system.time(rnorm(1000000)%*%rnorm(1000000)) user system elapsed 1.06 0.05 1.14 in the command mode> system.time(rnorm(1000000)%*%rnorm...

813 sym

Importing Generic Function from Other Package: A Tip on Writing a R Package

30.01.2009

I did not know this and had to spend the whole week to figure out what’s wrong with my code. I was updating the mi package. While I was doing code checking procedure, I always got a error message that I did not know what was going on. I remember last time when I encountered this, I just reduced the package dependency or simply don...

808 sym

Our new R package: R2jags

08.02.2009

I have got emails occasionally from JAGS users, asking about our new R package: R2jags. Basically, R2jags runs JAGS via R and makes postanalysis easier to be done in R. Taking advantage of the functions provided by JAGS, rjags and R2WinBUGS, R2jags allows users to run BUGS in the same way as they would do it in...

813 sym