Thanks John Verzani and Michael Lawrence for their helps on RGtk2-programming. 
Thanks Prof Brian Ripley for various issues regarding programming with R.