Re: [R] How to select a subset data to do a barplot in ggplot2

2012-12-13 Thread Dennis Murphy
Hi: The simplest way to do it is to modify the input data frame by taking out the records not having status live or dead and then redefining the factor in the new data frame to get rid of the removed levels. Calling your input data frame DF rather than data, DF <- structure(list(FID = c(1L, 1L, 2

Re: [R] How to select a subset data to do a barplot in ggplot2

2012-12-13 Thread arun
Hi, May be this: p<-ggplot(subset(dat1,STATUS!="nosperm"),aes(x=FID))  p+geom_bar(aes(x=factor(FID),y=..count..,fill=STATUS)) A.K. - Original Message - From: Yao He To: r-help@r-project.org Cc: Sent: Thursday, December 13, 2012 7:38 AM Subject: [R] How to select a subs

[R] How to select a subset data to do a barplot in ggplot2

2012-12-13 Thread Yao He
Hi,everybody I have a dataframe like this FID IID STATUS 14621live 14628dead 24631live 24632live 24633live 24634live 64675live 64679dead 104716dead 104719live 104721dead 114726live 114728nosper

Re: [R] How to select a subset

2009-10-02 Thread Steve Lianoglou
Hi, On Oct 2, 2009, at 10:47 AM, Hyo Lee wrote: Hi guys, I need your help. I would like to select a subset from a dataset. This is the dimension of the dataset. dim(data1) [1] 72 36 1916 so, it's like.. there are 1916 of 72 * 36 matrix. ==> looks like 72 * ( 36*1916 ) ** *1)* And I

[R] How to select a subset

2009-10-02 Thread Hyo Lee
Hi guys, I need your help. I would like to select a subset from a dataset. This is the dimension of the dataset. > dim(data1) [1] 72 36 1916 so, it's like.. there are 1916 of 72 * 36 matrix. ==> looks like 72 * ( 36*1916 ) ** *1)* And I would like to select the first 72*36 matrix. This is h