Re: [R] need help with distribution graphics

2013-12-30 Thread capricy gao
Thanks a lot! On Saturday, December 28, 2013 2:54 PM, Jim Lemon wrote: On 12/29/2013 03:41 AM, capricy gao wrote: > Really? > > OK, here the linked is an example: > > http://iai.asm.org/content/77/10/4631/F1.expansion.html > > > Please, any input would be app

Re: [R] need help with distribution graphics

2013-12-28 Thread capricy gao
Really? OK, here the linked is an example: http://iai.asm.org/content/77/10/4631/F1.expansion.html Please, any input would be appreciated! On Saturday, December 28, 2013 6:28 AM, Uwe Ligges wrote: On 28.12.2013 04:25, capricy gao wrote: > I need to graph categorical data like a o

[R] need help with distribution graphics

2013-12-27 Thread capricy gao
I need to graph categorical data like a or b in the the following figure. Could anybody let me know what command line I should go with? Thanks a lot! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] hist() : is there a way to change the border width?

2013-12-20 Thread capricy gao
Thanks a lot. It works! On Thursday, December 19, 2013 10:53 PM, Jim Lemon wrote: On 12/20/2013 08:19 AM, capricy gao wrote: > I have played around with it and found that the only color could be changed. > But I really would like to change the width... > Hi Capricy, Try this on

[R] hist() : is there a way to change the border width?

2013-12-19 Thread capricy gao
I have played around with it and found that the only color could be changed. But I really would like to change the width... Thanks a lot :) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] plot() function: color transparency

2013-12-18 Thread capricy gao
ncan Murdoch wrote: On 13-12-18 2:08 PM, capricy gao wrote: > I found all the color transparency was defined with character color, or rgb > color. What if I have number code and still try to modify the transparency? > > For example: > >> x=c(1:5) >> color=c(2,2,3,

[R] plot() function: color transparency

2013-12-18 Thread capricy gao
I found all the color transparency was defined with character color, or rgb color. What if I have number code and still try to modify the transparency? For example: >x=c(1:5) > color=c(2,2,3,4,5) > plot(x, col=color) > plot(x, col=color,pch=20) here I defined color by numbers, how can I modify

Re: [R] Heatmap, and heatmap.2 gave different figures for the same dataset

2013-12-12 Thread capricy gao
Thank you very much for the hints. I fixed the problem. On Thursday, December 12, 2013 2:08 PM, Kevin Wright wrote: Read the help page for both and pay particular attention to the "scale" argument. Kevin Wright On Thu, Dec 12, 2013 at 9:45 AM, capricy gao wrote: I h

[R] method default for hclust function

2013-12-12 Thread capricy gao
I could not figure out what was the default when I ran hclust() without specifying the method. For example: I just have a code like: hclust(dist(data)) Any input would be appreciated:) [[alternative HTML version deleted]] __ R-help@r-project

[R] Heatmap, and heatmap.2 gave different figures for the same dataset

2013-12-12 Thread capricy gao
I have a huge dataset(15k X 18) and tried to use the heatmap in R to examine the patterns. However, I found that heatmap and heatmap.2 gave me completely different outputs. Here are the codes: > dim(as.matrix(data.dcpm)) [1] 15462    18 > > heatmap(as.matrix(data.dcpm), col=topo.

Re: [R] problem with grep under loop

2013-09-17 Thread capricy gao
Thanks a lot. It works great now! Cc: R help Sent: Friday, September 13, 2013 11:46 PM Subject: Re: [R] problem with grep under loop Hi, dat1<- read.table("gao.txt",sep="",header=FALSE,stringsAsFactors=FALSE)  dat1 #   V1 V2 V3  

Re: [R] problem with grep under loop

2013-09-13 Thread capricy gao
Sorry about that. I will try to reformat my question. I have a dataset with format like: -- > head(data)    V1 V2 V3   V4   V5  V6   V7   V8 1 ref_gene_id ref_id class_code cuff_gene_id  cuff_id FMI FPKM FPKM_conf_lo 2

Re: [R] problem with grep under loop

2013-09-13 Thread capricy gao
Thanks a lot for all the responses!! I then first test my data: > dim(data) [1] 52086    13 >  if(grep(data[3,4],data[3,12])==1) print("Y") [1] "Y" > for(i in 1:52086){if(grep(data[i,4],data[i,12])==1) print ("Y")} Error in if (grep(data[i, 4], data[i, 12]) == 1) print("Y") :   argument is of len

[R] problem with grep under loop

2013-09-13 Thread capricy gao
I am just testing the possibility of using grep under for loop: >for(i in 1:10){grep("a",letters)} nothing came out; when I ran: >grep("a",letters), I got "1" so in my for loop, I expected to see ten "1"s, but I did not. Could anybody help me to figure out why? Thanks a lot for your h

Re: [R] still about biplot for principal componens analysis

2013-05-01 Thread capricy gao
in the predicted output I got from the following command predict(pca2, originalData, ...) Capricy From: Jim Lemon Cc: "r-help@r-project.org" Sent: Wednesday, May 1, 2013 5:33 AM Subject: Re: [R] still about biplot for principal componens analysis On 0

Re: [R] still about biplot for principal componens analysis

2013-04-30 Thread capricy gao
principal componens analysis very helpful!! Thanks a lot. From: Jim Lemon Cc: "r-help@r-project.org" Sent: Monday, April 29, 2013 6:53 PM Subject: Re: [R] biplot for principal componens analysis On 04/30/2013 08:24 AM, capricy gao wrote: >

[R] still about biplot for principal componens analysis

2013-04-30 Thread capricy gao
biplot for principal componens analysis very helpful!! Thanks a lot. From: Jim Lemon Cc: "r-help@r-project.org" Sent: Monday, April 29, 2013 6:53 PM Subject: Re: [R] biplot for principal componens analysis On 04/30/2013 08:24 AM, capricy gao wrote: >

Re: [R] biplot for principal componens analysis

2013-04-30 Thread capricy gao
very helpful!! Thanks a lot. From: Jim Lemon Cc: "r-help@r-project.org" Sent: Monday, April 29, 2013 6:53 PM Subject: Re: [R] biplot for principal componens analysis On 04/30/2013 08:24 AM, capricy gao wrote: > > > I did a PCA for

[R] biplot for principal componens analysis

2013-04-29 Thread capricy gao
I did a PCA for my data which has a dimension of 19000X4 using princomp >pca2=princomp((data), cor=F) and obtained a biplot with 19000 labels which were very busy. How can I just show 19000 spot w/o labels? >biplot(pca2) Thanks a lot:)) -data

Re: [R] plot in log scale in both x-axis and y-axis

2013-04-04 Thread capricy gao
Thanks a lot. From: R. Michael Weylandt Cc: "r-help@r-project.org" Sent: Thursday, April 4, 2013 3:41 PM Subject: Re: [R] plot in log scale in both x-axis and y-axis > > I am trying to plot(x,y, log="y"), which gives me log scale on y axis only. I > wond

[R] plot in log scale in both x-axis and y-axis

2013-04-04 Thread capricy gao
I am trying to plot(x,y, log="y"), which gives me log scale on y axis only. I wonder if there is way so that I can plot log scale on both of x and y axis. Thanks a lot:) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] looking for help with clustering analysis

2013-04-03 Thread capricy gao
My data have good correlations with spearman method and bad correlations with pearson method. If I want to do cluster analysis to reflect the sprearman correlation, what method should I use to calculate the distance matrix? Thanks. Xin   [[alternati

[R] Help on dendrogram reorder

2013-03-22 Thread capricy gao
I plot a dendrogram using the following code: hc <- hclust(dist(USArrests[1:10,]), "ave") unlist(as.dendrogram(hc))  [1]  7  1  8  4  6 10  9  2  3  5 how can I easily flip some leaves so that the unlist results are:  [1]  7  1  8  4  6 10  9  5 3 2 Thanks a lot! [[alternative HTML ve

[R] Need help to plot clara results [clustering]

2013-03-21 Thread capricy gao
I am going to use clara for  gene expression analysis, so tried to play around with the examples from R document: http://127.0.0.1:10699/library/cluster/html/clara.html Everything looked fine until I tried to plot the results: it says: waiting to confirm page change... I waited for more tha

Re: [R] How to subsetting data based on factor levels

2013-03-20 Thread capricy gao
Thanks a lot! Cc: R help Sent: Tuesday, March 19, 2013 8:39 PM Subject: Re: [R] How to subsetting data based on factor levels levels(group) #[1] "A" "C"  levels(group)=="A" #[1]  TRUE FALSE a[,group=="A"] # A AB #[1,] 1  6 #[2,] 2  7 #[3,] 3  8 #[4,]

[R] How to subsetting data based on factor levels

2013-03-19 Thread capricy gao
Here are the code and results > a=matrix(1:20,5) > a [,1] [,2] [,3] [,4] [1,]    1    6   11   16 [2,]    2    7   12   17 [3,]    3    8   13   18 [4,]    4    9   14   19 [5,]    5   10   15   20 > colnames(a)=c("A","AB","C","CD") > a A AB  C CD [1,] 1  6 11 16 [2,] 2  7

[R] easy way to install new R version??

2013-03-02 Thread capricy gao
Some packages have to be installed on new R version, 2.15.3 but I have 2.15.2 If I don't want to go through all download, and uninstall and install procedures, is there any simple R command that could handle this? Thanks. [[alternative HTML version deleted]]