[R] Conditional plot length in R

2011-05-06 Thread Pavan G
Hello All, Let's say I have data spanning all quadrants of x-y plane. If I plot data with a certain x and y range using xlim and ylim or by using plot.formula as described in this link: http://www.mathkb.com/Uwe/Forum.aspx/statistics/5684/plotting-in-R *DF <- data.frame(x = rnorm(1000), y = rnorm(

[R] Create subsets of data

2011-05-09 Thread Pavan G
Hello All, Let's say I have points on a x-y plane. x ranges from 0-2 and y from 0-2. There are points in quadrants x[0:1]---y[0:1] and in x[1:2]y[1:2]. I would like to get the mean and std of the points in the x[0:1]y[0:1] quadrant alone. Is there a straight forward way to do it? I asked a

Re: [R] Create subsets of data

2011-05-10 Thread Pavan G
Thanks David and Steve. This is exactly what I was looking for. tapply seems to be one robust command. (Humor of any potency is always a welcome thing in academia :) WSS [[alternative HTML version deleted]] __ R-help@r-project.org mailing list h

[R] Conditional coloring

2011-03-14 Thread Pavan G
Hello All, I have a histogram with values above and below 0. I would like to color the +ve bars green and -ve bars red. I am plotting data using: hist(a[,2],breaks=100,main="W3",xlab="Movement towards site (A)") Can someone please comment on how it can be done? Thanks! [[alternative HTML

Re: [R] Conditional coloring

2011-03-18 Thread Pavan G
Mighty thanks Peter. This does precisely what I wanted. Thanks again. On Mon, Mar 14, 2011 at 4:52 PM, Peter Langfelder < peter.langfel...@gmail.com> wrote: > On Mon, Mar 14, 2011 at 1:06 PM, Pavan G wrote: > > Hello All, > > I have a histogram with values above and bel

[R] Find x value of density plots

2011-12-06 Thread Pavan G
Hello All, How do I find the x value at max density for say, this plot plot(density(rnorm(1000))) Thank you, P [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] Find x value of density plots

2011-12-08 Thread Pavan G
Vielen Dank! On Tue, Dec 6, 2011 at 1:48 PM, Duncan Murdoch wrote: > On 06/12/2011 1:42 PM, Pavan G wrote: > >> Hello All, >> >> How do I find the x value at max density for say, this plot >> plot(density(rnorm(1000))) >> > > d <- density(rnorm(10

[R] read.table question

2011-12-08 Thread Pavan G
Hello All, This works, results <- read.table("plink.txt",T) while this doesn't. results <- read.table("plink.txt") Make sure your data frame contains columns CHR, BP, and P What does adding the "T" in read.table do? Which argument does this correspond to? I tried searching for it but didn't fin

Re: [R] read.table question

2011-12-09 Thread Pavan G
Thanks All! On Thu, Dec 8, 2011 at 7:41 PM, Robert Baer wrote: > Hello All, > This works, > results <- read.table("plink.txt",T) > > while this doesn't. > results <- read.table("plink.txt") > > The T is the value for the second parameter which you show from the help > file p