Monday, February 27, 2012

ggplot

> head(tmp)
    V1     V2     V3 hcg     hmeth mch      mmeth class       h_m
1 chr1 884000 885000 107 0.0105356  55 0.00406504     M 0.2890211
2 chr1 885000 886000 103 0.0158201  30 0.01015230     M 0.5357160
3 chr1 886000 887000 119 0.0170750  36 0.41832700     L 0.5192445
4 chr1 887000 888000  50 0.5725810  16 0.94303800     L 0.4948500
5 chr1 888000 889000  51 0.8819190  29 0.95502600     M 0.2451722
6 chr1 889000 890000  73 0.8581730  21 0.94063900     M 0.5411036






pdf("Human_mouse_cg.pdf")
ggplot(tmp, aes(x=h_m, colour=class)) + geom_density(adjust=5)
dev.off()


where the adjust  option adjusts the smoothness of the density plot.




http://had.co.nz/ggplot2/stat_density.html






Change axis labels 

By default, ggplot uses the variable name as the axis labels. Change it to something else using scale_x_continuous or scale_y_continuous
p = ggplot(diamonds)+geom_point()+aes(x=carat,y=price)

p + scale_x_continuous('x axis label') + scale_y_continuous('y axis label')


Colors
look at here:
http://wiki.stdout.org/rcookbook/Graphs/Colors%20(ggplot2)/

Wednesday, February 22, 2012

02/22/12

好吧,最近不爽,很不爽。科研停滞不前,跟老板沟通有障碍。我觉得我就是爱走极端,陷到自己的情绪里无法自拔。真傻,怎么能跟老板怄气呢,老板对我那么好,怎么能把对自己的不满发泄到老板身上呢? 好想哭,乱七八糟的,越叫我有条理我就越乱。

今天09年化学诺奖得主跟大家聊天,嗯 好奇心最重要,可是我现在的好奇心降到奇低的水平,没有方向,何言进度!怎么能洗心革面,重新做研究僧呢? 想骂街骂街骂街骂街!

Wednesday, February 1, 2012

01/02/12

在冷泉实验室,昨天一切顺利,跟着安团做了两三步。今天BStreatment也还好,可是到下午最关键时候,安团同学去开会了剩下我跟艾米莉做Egel,然后我就倒霉了。

明天给大家讲HMM,希望不会掉链子。