[R] calculating probability from the density function

2012-10-01 Thread Eugene Kanshin
Hello, I have a data x with normal (or very close to normal) distribution, I can plot a density distribution with density(x,...). My question is is there any way to calculate an area under this distribution (=probability) for particular range of x values, let's say for x from 0 to 2? I was not able

[R] white on black theme for ggplot2

2011-10-05 Thread Eugene Kanshin
Hello, I'm trying to produce some plots in ggplot2 to use them on the dark-blue gradient background. I am wondering if there is already any theme/set of options that I can use to change the color scheme and add transparency. Thank you very much, Evgeny. [[alternative HTML version deleted]]

[R] need help on melt/cast

2011-09-22 Thread Eugene Kanshin
Hello, I need to convert dataframe from: ID T0 T1 T2 A1 2 3 B4 5 6 C7 8 9 to: ID Variable Value A T0 1 A T1 2 A T2 3 B T0 4 B T1 5 B T2 6 C T0 7 C T1 8 C