2013年2月24日 星期日

R plot png file on centos

Problem:
 When you run R on in primary centOS server, you didn't use the png. It will appear some error "Error in X11...unable to start device PNG".  "
"unable to open connection to X11 display "


Solution:
Install the package
{code}
>yum install libpng-devel.x86_64
{code}

{code}
R
# To avoid the x11 warning
Sys.setenv("DISPLAY"=":0.0")
{code}




Reference:
Install libpng package
Check the png Capabilities of R
R with x11 setting





2013年2月21日 星期四

R package install method

Currently, I only try the local method

For example install HSAUR: A Handbook of Statistical Analyses Using R package

1. Download the package from the cran HSAUR_1.3-0.tar.gz
2. R
>install.packages(file_name_and_path, repos = NULL, type="source")


Reference: How to install R package 
the possible method from network 

2013年2月18日 星期一