[R] Z score in gplots

2012-07-29 Thread Khush gg
Hi,

Can anyone tell me how to set Z-score according to my own requirement as
the below code is taking as per the file entries. Any help would
be appreciable.

library(gplots)
x=read.table(final.txt, header=TRUE)
mat=data.matrix(x)
heatmap.2(mat,
col=colorRampPalette(c(green,white,red))(256),
#col=greenred(75),
Rowv=TRUE,
Colv=FALSE,
distfun = dist,
hclustfun = hclust,
dendrogram = c(row),
scale = c(column),
na.rm=TRUE,
trace=none,
sepwidth=c(0.05,0.05),
margins = c(01, 55),
xlab = , ylab = ,
labRow = NULL,
labCol = NULL,
key=TRUE,
keysize=1,
density.info=c(none),
)

Thank you in advance

KS

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] gplot heatmap

2012-01-27 Thread khush ........
Hi,

I am drawing a heat map using gplots of R package. The file (new4) is
having values 0 and 1 only.


library(gplots)
library(marray)
x=read.table(new4, header=TRUE)
mat=data.matrix(x)
heatmap.2(mat,
col=colorRampPalette(c(black,red))(256),
#col=greenred(75),
Rowv=TRUE,
Colv=TRUE,
distfun = dist,
hclustfun = hclust,
dendrogram = c(row),
scale = c(row),
na.rm=TRUE,
trace=none,
sepwidth=c(0.05,0.05),
margins = c(25, 20),
#xlab =  ylab = 
labRow = NULL,
labCol = NULL,
key=TRUE,
keysize=1,
density.info=c(none)
)

I am giving two color only i.e red and black but when I am try to make the
plot it again show in gradients. Therefore, I just want to plot a heat map
with two color scheme.

Thanks in advance

Thank you
Khushwant

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] venn diagramm

2011-05-08 Thread khush ........
Dear Patrick,

Thanks for your reply, I know its hectic to c such graphs, as they are
difficult to interpret, but I got this interesting link from R
http://www.oga-lab.net/RGM2/func.php?rd_id=gplots:venn, mentioned about venn
diagram for 5 subsets.

 ## Example using a list of item names belonging to the
 ## specified group.
 ##

 ## construct some fake gene names..
 oneName - function() paste(sample(LETTERS,5,replace=TRUE),collapse=)
 geneNames - replicate(1000, oneName())

 ##
 GroupA - sample(geneNames, 400, replace=FALSE)
 GroupB - sample(geneNames, 750, replace=FALSE)
 GroupC - sample(geneNames, 250, replace=FALSE)
 GroupD - sample(geneNames, 300, replace=FALSE)
 input  -list(GroupA,GroupB,GroupC,GroupD)

 input

venn(input)

But not sure how to give files, as in this example I think they are
giving at terminal,
I am not sure this is hard to understand for me.

But I will try it with different sides and I hope I will get something
of of it. But if
you also extract some good plz let me know.

I also got a online tool called venny to draw for 4 subsets.

Thanks
khush

On Sat, May 7, 2011 at 10:28 PM, Breheny, Patrick
patrick.breh...@uky.eduwrote:

 I've never actually used it with 5 subsets, but the 'venn' function in the
 gplots package claims to be able to make a Venn diagram with up to 5
 subsets.

 --Patrick

 
 From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On
 Behalf Of khush  [bioinfo.kh...@gmail.com]
 Sent: Saturday, May 07, 2011 9:54 AM
 To: r-help@r-project.org
 Subject: [R] venn diagramm

 Dear all,

 I have a set of five datasets with string, for which I need to draw the
 venn
 diagram. there are tools available to draw venn diagram online, but limited
 to three sets. I can also generate venn for three from limma package, but
 do
 not know how to proceed with five subsets.

 Help me in drawing the same any script .

 Thank you
 Khush




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] venn diagramm

2011-05-07 Thread khush ........
Dear all,

I have a set of five datasets with string, for which I need to draw the venn
diagram. there are tools available to draw venn diagram online, but limited
to three sets. I can also generate venn for three from limma package, but do
not know how to proceed with five subsets.

Help me in drawing the same any script .

Thank you
Khush

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Clustering help in Heat Maps

2011-04-12 Thread khush ........
Dear Experts,

I am using the below script to generate the heat map of gene expression
data. I am using Hierarchical Clustering (hclust) for clustering. Now I want
to compare different clustering parameters such as *K-means* clustering, Model
Based Clustering,

I have two queries:

1. How to incorporate different clustering method in the same code?
2. Is this possible to implement pvclust in the same code and cluster
accordingly?

library(gplots)

#===Cyto=
#x=read.table(Cyto_shoot.txt, header=TRUE)
mat=data.matrix(x)
heatmap.2(mat,
# c('red','green','orange','blue','yellow',
'gray','black','brown','aquamarine3','cyan',
'darkmagenta','darkviolet','green4'))
col=colorRampPalette(c(green,white,red))(256),

#col=greenred(75),
#col = cm.colors(256),
#bgStyle=3D Rectangle,
#bgGradientMode= Diagonal Edge,
Rowv=TRUE,

Colv=FALSE,
distfun = dist,
hclustfun = hclust,
dendrogram = c(row),
scale = c(column),
na.rm=TRUE,
trace=none,
sepwidth=c(0.05,0.05),
margins = c(03, 40),
xlab = , ylab = ,
labRow = NULL,
labCol = NULL,
key=TRUE,
keysize=1,
density.info=c(none),
)


Thanks in advance

Kamal

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Drawing Heatmap using gplots

2010-09-18 Thread khush ........
Hi,

I am using heatmap.2 of gplots to make heatmaps of my the attached file. I
am giving my code for the same ..

library(gplots)
x=read.table(1.txt, header=TRUE)
mat=data.matrix(x)

heatmap.2(mat, col=greenred(75),
Rowv=TRUE,
Colv=TRUE,
distfun = dist,
hclustfun = hclust,
dendrogram = c(both),
scale = c(row),
na.rm=TRUE,
trace=none,
sepwidth=c(0.05,0.05),
margins = c(5, 10),
xlab = EXPRESSIONS, ylab = GENES,
labRow = NULL,
labCol = NULL,
key=TRUE,
keysize=1,
density.info=c(none),
)


I have certain queries regarding the same.


1. why the heat map is totally different from what the sequence of
information is?
2. Is there any way to arrange the data based on the expression pattern of
the genes or some other way, which make some sense out of data.
3. I have some color issues as the number of genes increases the green and
black colors are not as much as prominent as red?

Thank you so much for your help in advance.

Thank you
Khushwant
CAF CAS INF INS AP1 AP3 AGM SAP S04 
S52 LEF LES ROF ROS GSE SIF SIS
At1g01940   107 111 20  27  40  52  27  8   
6   24  40  18  67  85  35  56  118
At1g26940   35  27  30  28  15  41  12  73  
6   15  21  11  60  35  6   24  77
At1g53720   34  35  16  52  15  27  24  13  
3   12  35  6   43  51  1   21  25
At1g53780   2   6   2   11  6   9   7   0   
0   0   6   10  5   19  0   0   0
At1g74070   0   16  18  41  18  23  13  9   
68  7   41  39  0   6   29  66  53
At2g15790   0   61  0   2   1   1   2   0   
0   5   0   0   0   8   0   0   47
At2g16600   703 1157414 299 616 12351208645 
25743308473 183 17971156455 735 596
At2g21130   240 154 270 615 78  265 1257769 
704 126 16  22  70  1   20  140 208
At2g29960   81  145 23  45  62  37  49  25  
52  39  48  27  31  151 0   35  293
At2g36130   248 36  88  46  32  110 86  58  
10  6   278 34  252 96  0   190 84
At2g38730   26  8   16  6   4   18  0   0   
0   0   0   0   6   1   0   22  0
At2g47320   105 82  87  88  42  91  118 158 
84  96  87  132 394 301 30  378 302
At3g01480   0   6   174 48  36  159 52  79  
56  101 0   88  8   2   103 207 41
At3g15520   0   0   86  70  30  52  17  19  
47  7   70  43  68  0   33  38  45
At3g22920   0   0   0   0   0   0   0   0   
0   0   0   0   0   0   0   0   0
At3g44600   62  166 62  48  24  39  26  14  
0   4   56  32  106 155 2   28  18
At3g55920   42  52  27  6   11  28  25  68  
82  10  15  33  27  17  1   24  81
At3g56070   234 136 112 136 112 260 128 150 
0   24  106 18  322 222 20  70  88
At3g62030   34  109 241 129 181 338 304 595 
463 849 810 406 18  94  399 566 1992
At3g63400   138 138 144 60  63  57  60  26  
53  32  82  66  143 127 91  87  37
At3g66654   79  45  37  15  16  16  23  17  
0   59  88  25  40  65  12  50  23
At4g17070   39  103 4   18  33  19  22  33  
15  81  56  28  7   100 32  7   41
At4g32420   71  112 59  125 81  103 108 93  
30  11  69  30  17  80  7   24  93
At4g33060   164 106 70  20  23  42  23  9   
0   14  39  47  74  92  14  222 252
At4g34870   299016  3272320 421 433 311 434 
104 19  153297  6519312 345 316075
At4g34960   101 38  300 1   1   7   2   0   
0   0   33  0   172 14  0   118 52
At4g38740   503422721986

[R] Drawing Heatmap using gplots

2010-09-18 Thread khush ........
Hi,

I am using heatmap.2 of gplots to make heatmaps of my the file. I am giving
my code for the same ..

library(gplots)
x=read.table(1.txt, header=TRUE)
mat=data.matrix(x)

heatmap.2(mat, col=greenred(75),
Rowv=TRUE,
Colv=TRUE,
distfun = dist,
hclustfun = hclust,
dendrogram = c(both),
scale = c(row),
na.rm=TRUE,
trace=none,
sepwidth=c(0.05,0.05),
margins = c(5, 10),
xlab = EXPRESSIONS, ylab = GENES,
labRow = NULL,
labCol = NULL,
key=TRUE,
keysize=1,
density.info=c(none),
)

my file is like this ...

CAF CAS INF INS AP1 AP3 AGM SAP
S04 S52 LEF LES ROF ROS GSE SIF SIS
At1g01940   107 111 20  27  40  52  27
8   6   24  40  18  67  85  35  56  118
At1g26940   35  27  30  28  15  41  12
73  6   15  21  11  60  35  6   24  77
At1g53720   34  35  16  52  15  27  24
13  3   12  35  6   43  51  1   21  25
At1g53780   2   6   2   11  6   9   7
0   0   0   6   10  5   19  0   0   0
At1g74070   0   16  18  41  18  23  13
9   68  7   41  39  0   6   29  66  53
At2g15790   0   61  0   2   1   1   2
0   0   5   0   0   0   8   0   0   47
At2g16600   703 1157414 299 616 12351208
645 25743308473 183 17971156455 735 596
At2g21130   240 154 270 615 78  265 1257
769 704 126 16  22  70  1   20  140 208
At2g29960   81  145 23  45  62  37  49
25  52  39  48  27  31  151 0   35  293
At2g36130   248 36  88  46  32  110 86
58  10  6   278 34  252 96  0   190 84
At2g38730   26  8   16  6   4   18  0
0   0   0   0   0   6   1   0   22  0
At2g47320   105 82  87  88  42  91  118
158 84  96  87  132 394 301 30  378 302
At3g01480   0   6   174 48  36  159 52
79  56  101 0   88  8   2   103 207 41
At3g15520   0   0   86  70  30  52  17
19  47  7   70  43  68  0   33  38  45
At3g22920   0   0   0   0   0   0   0
0   0   0   0   0   0   0   0   0   0
At3g44600   62  166 62  48  24  39  26
14  0   4   56  32  106 155 2   28  18


I have certain queries regarding the same.


1. why the heat map is totally different from what the sequence of
information is?
2. Is there any way to arrange the data based on the expression pattern of
the genes or some other way, which make some sense out of data.
3. I have some color issues as the number of genes increases the green and
black colors are not as much as prominent as red?

Thank you so much for your help in advance.

Thank you
Khushwant

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Argument lib is missing

2010-09-11 Thread khush ........
Dear all,

I have installed R using yum install R-2.9.  I am able to use R for general
functions but when I installed some library say gplots I am getting the
below error.

 install.packages(gplots)
Warning in install.packages(gplots) :
  argument 'lib' is missing: using
'/home/fedora/R/i386-redhat-linux-gnu-library/2.11'
Warning: unable to access index for repository
http://cran.csdb.cn/src/contrib
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘gplots’ is not available

any suggestion will be appreciable.

Thank you
Khush

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R code changes to crap

2010-09-02 Thread khush ........
Hi,

I am using vim to edit my files...I do not know what has been pressed by me
as my R code get converted to such a crap...

%PDF-1.4
%81â81ã81Ï81Ó\r
1 0 obj

/CreationDate (D:20100902122215)
/ModDate (D:20100902122215)
/Title (R Graphics Output)
/Producer (R 2.11.1)
/Creator (R)

how to reconvert it to the my actual code?? as I do not have  backup for
it..?

Thanks in advance
Khushwant

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Save data as .pdf or .JPG

2010-09-01 Thread khush ........
Hi all ,

I have following script to plot some data.

plot( c(1,1100), c(0,15), type='n', xlab='', ylab='', ylim=c(0.1,25) ,
las=2)
axis (1, at = seq(0,1100,50), las =2)
axis (2, at = seq(0,25,1), las =2)

lines( c(1,304),c(0,0),col='grey', lwd=3 )
lines( c(1,238),c(1,1),col='grey', lwd=3 )

segments(86, 0,270,col = green, pch=23, cex=9, lty=solid,
lwd=14,lend=2)
segments(74,1,238,col = green, pch=23, cex=9, lty=solid,
lwd=14,lend=2)

When I source(script.R), I got the image on interface but I do not want to
use screenshot option to save the image? How can save the output to .pdf or
.jpg format?

Thanks in advance

Thank you
Khushwant

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] points marking

2010-06-22 Thread khush ........
Hej Gregory,

Thanks for your reply and sorry for late reply, actually I was busy with
some other stuff but It helped me alot.
Thanks again sir.

Thanks to both of you.

Thank you
Jeet
On Wed, Jun 16, 2010 at 2:27 AM, Greg Snow greg.s...@imail.org wrote:

  OK, I did not see the website before, here is some code to replicate the
 example shown there (except I don’t do 3D effects):



 library(TeachingDemos)



 plot( c(1,1000), c(1,5), type='n', xlab='', ylab='', yaxt='n',
 ylim=c(0.5,5.5) )



 tmpfun - function( n, col, txt, cex=.5 ) {

 plot.window( c(-1,1), c(-1,1) )

 ms.filled.polygon( n=n, fg=col, bg=col, adj=0 )

 shadowtext(0,0, txt, cex=cex)

 }



 lines( c(1,700), c(1,1), col='grey', lwd=3 )



 lines( c(100,100,200,200), c(1,1.25,1.25,1) )



 lines( c(320,320), c(1,1.25), col='red' )

 points( 320, 1.25, pch=18, col='red' )



 subplot( tmpfun(400, 'grey15', 'MY'), c(50, 150), c(0.85,1.15) )

 subplot( tmpfun(5, 'green', 'DOM'), c(300, 400), c(0.85, 1.15) )





 Hope this helps get you started (this could all be wrapped into a single
 function if you want, additional proteins can be added at 2, 3, …),



 --

 Gregory (Greg) L. Snow Ph.D.

 Statistical Data Center

 Intermountain Healthcare

 greg.s...@imail.org

 801.408.8111



 *From:* khush  [mailto:bioinfo.kh...@gmail.com]
 *Sent:* Monday, June 14, 2010 11:21 PM
 *To:* Greg Snow
 *Cc:* Petr PIKAL

 *Subject:* Re: [R] points marking



 Dear Gregory ,

 Thanks for your kind reply, and consideration towards my query, well have
 you check with the link that I sent you the other day (
 http://www.expasy.ch/tools/mydomains/),  in which you need to set the
 protein length first and  then the domain data, with various shapes i.e 1-6
 and 4 different colors respectively.

 In the second part of the example,

 50  ,150 ,   2,4, MY
 300 ,400 ,   3,2, DOM

 I am drawing all the data with barplots as they are so many so I am using
 barplots, and they are of variuos length, as I mentioned in Dom (has all the
 protein lengths in it), now I wanted to draw various shapes to my data say
 on bar 1 of barplots segments 50-150 has shapes say x and color = red, adn
 its name is MY , and this could repeat for other bars of the plot but with
 different points .

 same like other if I want to plot the segments 300-400 with shapes say y
 and color = red and its name should be DOM

 I want to make a script which could take the length of the protein and draw
 corresponding domains on it. Hope you understand the way I am explaining you
 now. Please feel free to ask further if needed.


 Thank you
 Jeet


  On Mon, Jun 14, 2010 at 9:13 PM, Greg Snow greg.s...@imail.org wrote:

 I don’t think that I would use a barplot as the base, but rather just set
 up the graph and add the lines where I wanted them.  I still don’t
 understand what you want your graph to look like, or what question you are
 trying to answer with it (part may be a language barrier).  If you can give
 us a better example of what you are trying to accomplish, or a better
 description of what your data is like and what you are trying to get from
 the graph, we will have a better chance of being able to help you.



 --

 Gregory (Greg) L. Snow Ph.D.

 Statistical Data Center

 Intermountain Healthcare

 greg.s...@imail.org

 801.408.8111



 *From:* khush  [mailto:bioinfo.kh...@gmail.com]
 *Sent:* Saturday, June 12, 2010 5:38 AM
 *To:* Greg Snow
 *Cc:* r-help@r-project.org; Petr PIKAL


 *Subject:* Re: [R] points marking



 Hi,

 Well Thanks for letting me know that pch is of no use with segments petr. I
 am using lend as it suits to me more as gregory suggested , but I am not
 getting imite???  think I try to fix it with some other method also, as I
 have to deal more with the symbols in this case, But I want to the know one
 thing from you guys that the way I am using the code is good enough to
 start, as I am not much familiar with this suff or its dirty way to handle
 such task. please let me know.

 Thanks gregory and petr.

 Thank you
 Jeet



 On Fri, Jun 11, 2010 at 9:07 PM, Greg Snow greg.s...@imail.org wrote:

 Those graphs look like chromosome maps, if so, you may want to look into
 the bioconductor project, they may have some prewritten functions to do
 this.  If not, the lend argument (see ?par) may be something to look at.  If
 you really want points and segments you will need to plot the points with
 the points function and the segments separately.  Segments can take vectors,
 so you don’t need to separate things into multiple calls.



 --

 Gregory (Greg) L. Snow Ph.D.

 Statistical Data Center

 Intermountain Healthcare

 greg.s...@imail.org

 801.408.8111



 *From:* khush  [mailto:bioinfo.kh...@gmail.com]
 *Sent:* Friday, June 11, 2010 12:00 AM
 *To:* Greg Snow
 *Cc:* r-help@r-project.org
 *Subject:* Re: [R] points marking



 Dear Gregory ,

 Thnaks for your reply and help. I am explaining you my problems

Re: [R] points marking

2010-06-12 Thread khush ........
Hi,

Well Thanks for letting me know that pch is of no use with segments petr. I
am using lend as it suits to me more as gregory suggested , but I am not
getting imite???  think I try to fix it with some other method also, as I
have to deal more with the symbols in this case, But I want to the know one
thing from you guys that the way I am using the code is good enough to
start, as I am not much familiar with this suff or its dirty way to handle
such task. please let me know.

Thanks gregory and petr.

Thank you
Jeet



On Fri, Jun 11, 2010 at 9:07 PM, Greg Snow greg.s...@imail.org wrote:

  Those graphs look like chromosome maps, if so, you may want to look into
 the bioconductor project, they may have some prewritten functions to do
 this.  If not, the lend argument (see ?par) may be something to look at.  If
 you really want points and segments you will need to plot the points with
 the points function and the segments separately.  Segments can take vectors,
 so you don’t need to separate things into multiple calls.



 --

 Gregory (Greg) L. Snow Ph.D.

 Statistical Data Center

 Intermountain Healthcare

 greg.s...@imail.org

 801.408.8111



 *From:* khush  [mailto:bioinfo.kh...@gmail.com]
 *Sent:* Friday, June 11, 2010 12:00 AM
 *To:* Greg Snow
 *Cc:* r-help@r-project.org
 *Subject:* Re: [R] points marking



 Dear Gregory ,

 Thnaks for your reply and help. I am explaining you my problems again,
 below  is my script for the same .

 Dom -c (195,568,559)

 fkbp - barplot (Dom, col=black, xlab=, border = NA, space = 7,
 xlim=c(0,650), ylim =c(0, 87), las = 2, horiz = TRUE)

 axis (1, at = seq(0,600,10), las =2)

 1. ==Segments 1=

 segments(164,7.8,192,7.8, col = green, pch=23, cex=9, lty=solid,
 lwd=20)
 segments(45,15.8,138,15.8, col = green, pch=23, cex=9, lty=solid,
 lwd=20)
 segments(160,15.8,255,15.8, col = green, pch=23, cex=9, lty=solid,
 lwd=20)
 segments(277,15.8,378,15.8, col = green, pch=23, cex=9, lty=solid,
 lwd=20)
 segments(51,23.8,145,23.8, col = green, pch=23, cex=9, lty=solid,
 lwd=20)
 segments(167,23.8,262,23.8, col = green, pch=23, cex=9, lty=solid,
 lwd=20)
 segments(284,23.8,381,23.8, col = green, pch=23, cex=9, lty=solid,
 lwd=20)

 2. ==Segments 2 ==
 segments(399,15.8,432,15.8, col = blue, pch=21, cex=9, lty=solid,
 lwd=20)
 segments(448,15.8,475,15.8, col = blue, pch=21, cex=9, lty=solid,
 lwd=20)
 segments(486,15.8,515,15.8, col = blue, pch=21, cex=9, lty=solid,
 lwd=20)
 segments(401,23.8,434,23.8, col = blue, pch=21, cex=9, lty=solid,
 lwd=20)
 segments(450,23.8,475,23.8, col = blue, pch=21, cex=9, lty=solid,
 lwd=20)
 segments(486,23.8,517,23.8, col = blue, pch=21, cex=9, lty=solid,
 lwd=20)

 I solved one part of my query i.e to mark points from one positions to
 other is ok and I found that its working fine but I have another issue now,
 as I am using using two segments data 1 and 2 , although I want to draw
 different shapes for segmants 2 as I am giving pch=21, but I it seems to
 give a solid line for both. I want to draw different shapes for every chunk
 of segments i.e is the whole point.

 I want to make script which can generate such figures, below is link to one
 of the tool.
 http://www.expasy.ch/tools/mydomains/

 Thank you

 Jeet

  On Thu, Jun 10, 2010 at 11:10 PM, Greg Snow greg.s...@imail.org wrote:

 Your question is not really clear, do either of these examples do what you
 want?

  with(anscombe, plot(x1, y2, ylim=range(y2,y3)) )
  with(anscombe, points(x1, y3, col='blue', pch=2) )
  with(anscombe, segments(x1, y2, x1, y3, col=ifelse( y2y3, 'green','red')
 ) )


  with(anscombe, plot(x1, y2, ylim=range(y2,y3), type='n') )
  with(anscombe[order(anscombe$x1),], polygon( c( x1,rev(x1) ), c(y2,
 rev(y3)), col='grey' ) )



 --
 Gregory (Greg) L. Snow Ph.D.
 Statistical Data Center
 Intermountain Healthcare
 greg.s...@imail.org
 801.408.8111



  -Original Message-
  From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
  project.org] On Behalf Of khush 
  Sent: Thursday, June 10, 2010 7:48 AM
  To: r-help@r-project.org
  Subject: [R] points marking
 
  Hi,
 
  How to  mark points on x axis of a graph keeping x axis as constant and
  changing y from y1 to y2 respectively. I want to highlight the area
  from y1
  to y2.
 
  Any suggestions
 
  Thank you
  Jeet
 

[[alternative HTML version deleted]]
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-
  guide.html
  and provide commented, minimal, self-contained, reproducible code.




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] points marking

2010-06-11 Thread khush ........
Dear Gregory ,

Thnaks for your reply and help. I am explaining you my problems again,
below  is my script for the same .

Dom -c (195,568,559)

fkbp - barplot (Dom, col=black, xlab=, border = NA, space = 7,
xlim=c(0,650), ylim =c(0, 87), las = 2, horiz = TRUE)

axis (1, at = seq(0,600,10), las =2)

1. ==Segments 1=

segments(164,7.8,192,7.8, col = green, pch=23, cex=9, lty=solid,
lwd=20)
segments(45,15.8,138,15.8, col = green, pch=23, cex=9, lty=solid,
lwd=20)
segments(160,15.8,255,15.8, col = green, pch=23, cex=9, lty=solid,
lwd=20)
segments(277,15.8,378,15.8, col = green, pch=23, cex=9, lty=solid,
lwd=20)
segments(51,23.8,145,23.8, col = green, pch=23, cex=9, lty=solid,
lwd=20)
segments(167,23.8,262,23.8, col = green, pch=23, cex=9, lty=solid,
lwd=20)
segments(284,23.8,381,23.8, col = green, pch=23, cex=9, lty=solid,
lwd=20)

2. ==Segments 2 ==
segments(399,15.8,432,15.8, col = blue, pch=21, cex=9, lty=solid,
lwd=20)
segments(448,15.8,475,15.8, col = blue, pch=21, cex=9, lty=solid,
lwd=20)
segments(486,15.8,515,15.8, col = blue, pch=21, cex=9, lty=solid,
lwd=20)
segments(401,23.8,434,23.8, col = blue, pch=21, cex=9, lty=solid,
lwd=20)
segments(450,23.8,475,23.8, col = blue, pch=21, cex=9, lty=solid,
lwd=20)
segments(486,23.8,517,23.8, col = blue, pch=21, cex=9, lty=solid,
lwd=20)

I solved one part of my query i.e to mark points from one positions to other
is ok and I found that its working fine but I have another issue now, as I
am using using two segments data 1 and 2 , although I want to draw different
shapes for segmants 2 as I am giving pch=21, but I it seems to give a solid
line for both. I want to draw different shapes for every chunk of segments
i.e is the whole point.

I want to make script which can generate such figures, below is link to one
of the tool.
http://www.expasy.ch/tools/mydomains/

Thank you

Jeet


On Thu, Jun 10, 2010 at 11:10 PM, Greg Snow greg.s...@imail.org wrote:

 Your question is not really clear, do either of these examples do what you
 want?

  with(anscombe, plot(x1, y2, ylim=range(y2,y3)) )
  with(anscombe, points(x1, y3, col='blue', pch=2) )
  with(anscombe, segments(x1, y2, x1, y3, col=ifelse( y2y3, 'green','red')
 ) )


  with(anscombe, plot(x1, y2, ylim=range(y2,y3), type='n') )
  with(anscombe[order(anscombe$x1),], polygon( c( x1,rev(x1) ), c(y2,
 rev(y3)), col='grey' ) )



 --
 Gregory (Greg) L. Snow Ph.D.
 Statistical Data Center
 Intermountain Healthcare
 greg.s...@imail.org
 801.408.8111


  -Original Message-
  From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
  project.org] On Behalf Of khush 
  Sent: Thursday, June 10, 2010 7:48 AM
  To: r-help@r-project.org
  Subject: [R] points marking
 
  Hi,
 
  How to  mark points on x axis of a graph keeping x axis as constant and
  changing y from y1 to y2 respectively. I want to highlight the area
  from y1
  to y2.
 
  Any suggestions
 
  Thank you
  Jeet
 
[[alternative HTML version deleted]]
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-
  guide.html
  and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] points marking

2010-06-10 Thread khush ........
Hi,

How to  mark points on x axis of a graph keeping x axis as constant and
changing y from y1 to y2 respectively. I want to highlight the area from y1
to y2.

Any suggestions

Thank you
Jeet

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] rgl installation failure

2010-06-05 Thread khush ........
Hello,

I am trying to install rgl package under R and getting some errors which is
below.

 install.packages(rgl)
Warning in install.packages(rgl) :
  argument 'lib' is missing: using '/usr/lib/R/library'
trying URL 'http://cran.csie.ntu.edu.tw/src/contrib/rgl_0.91.tar.gz'
Content type 'application/x-gzip' length 1677498 bytes (1.6 Mb)
opened URL
==
downloaded 1.6 Mb

* installing *source* package ‘rgl’ ...
checking for gcc... gcc -m32 -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m32 -std=gnu99 accepts -g... yes
checking for gcc -m32 -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -m32 -std=gnu99 -E
checking for gcc... (cached) gcc -m32 -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -m32 -std=gnu99 accepts -g... (cached) yes
checking for gcc -m32 -std=gnu99 option to accept ISO C89... (cached) none
needed
checking for libpng-config... no
checking libpng... checking for grep that handles long lines and -e...
/bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
checking for png_read_update_info in -lpng... no
configure: libpng header and lib found
configure: using libpng dynamic linkage
checking for X... libraries , headers
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for glEnd in -lGL... yes
checking for gluProject in -lGLU... yes
checking for freetype-config... yes
configure: using Freetype and FTGL
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -m32 -I/usr/include/R -DHAVE_PNG_H -DHAVE_FREETYPE -Iext/ftgl
-I/usr/include/freetype2 -Iext -I/usr/local/include   -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -fpic  -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -c BBoxDeco.cpp -o BBoxDeco.o
g++ -m32 -I/usr/include/R -DHAVE_PNG_H -DHAVE_FREETYPE -Iext/ftgl
-I/usr/include/freetype2 -Iext -I/usr/local/include   -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -fpic  -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -c Background.cpp -o Background.o
g++ -m32 -I/usr/include/R -DHAVE_PNG_H -DHAVE_FREETYPE -Iext/ftgl
-I/usr/include/freetype2 -Iext -I/usr/local/include   -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -fpic  -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -c Color.cpp -o Color.o
g++ -m32 -I/usr/include/R -DHAVE_PNG_H -DHAVE_FREETYPE -Iext/ftgl
-I/usr/include/freetype2 -Iext -I/usr/local/include   -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -fpic  -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -c Disposable.cpp -o Disposable.o
g++ -m32 -I/usr/include/R -DHAVE_PNG_H -DHAVE_FREETYPE -Iext/ftgl
-I/usr/include/freetype2 -Iext -I/usr/local/include   -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -fpic  -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
-fasynchronous-unwind-tables -c Light.cpp -o Light.o
g++ -m32 -I/usr/include/R -DHAVE_PNG_H -DHAVE_FREETYPE -Iext/ftgl
-I/usr/include/freetype2 -Iext -I/usr/local/include   -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom

Re: [R] rgl installation failure

2010-06-05 Thread khush ........
Hi,

Thanks Berwin for your suggestions , sorry to mention but it was fedora 12
OS that I am using. Actually I was missing libraries png which I installed
using yum and it work good now.

Earlier png.h was missing in /usr/includes/ but its is showing .

Thanks alot for your kind help.

Cheers

Thank you

Jeet

On Sat, Jun 5, 2010 at 1:07 PM, Berwin A Turlach ber...@maths.uwa.edu.auwrote:

 G'day,

 On Sat, 5 Jun 2010 12:51:08 +0530
 khush  bioinfo.kh...@gmail.com wrote:

  I am trying to install rgl package under R and getting some errors
  which is below.
 
   install.packages(rgl)
  Warning in install.packages(rgl) :
argument 'lib' is missing: using '/usr/lib/R/library'
  trying URL 'http://cran.csie.ntu.edu.tw/src/contrib/rgl_0.91.tar.gz'
  Content type 'application/x-gzip' length 1677498 bytes (1.6 Mb)
  opened URL
  ==
  downloaded 1.6 Mb
 
  * installing *source* package _rgl_ ...
  checking for gcc... gcc -m32 -std=gnu99
  checking for C compiler default output file name... a.out
  checking whether the C compiler works... yes
  checking whether we are cross compiling... no
  checking for suffix of executables...
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc -m32 -std=gnu99 accepts -g... yes
  checking for gcc -m32 -std=gnu99 option to accept ISO C89... none
  needed checking how to run the C preprocessor... gcc -m32 -std=gnu99
  -E checking for gcc... (cached) gcc -m32 -std=gnu99
  checking whether we are using the GNU C compiler... (cached) yes
  checking whether gcc -m32 -std=gnu99 accepts -g... (cached) yes
  checking for gcc -m32 -std=gnu99 option to accept ISO C89... (cached)
  none needed
  checking for libpng-config... no
  checking libpng... checking for grep that handles long lines and -e...
  /bin/grep
  checking for egrep... /bin/grep -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking png.h usability... no
  checking png.h presence... no
  checking for png.h... no
  checking for png_read_update_info in -lpng... no

 You should heed indications as the above, i.e. that items checked for
 are not found.

 [...]

  In file included from pixmap.cpp:14:
  pngpixmap.h:3:17: error: png.h: No such file or directory

 And this compiler error seems to be directly linked to the issues
 identified by configure; and all further error come from the fact that
 png.h cannot be found.

 You seem to be using some flavour of Unix, presumably GNU/Linux; but
 from your posting it is impossible to say which one.  On a Debian based
 system (e.g. Kubuntu 9.10 which I am using), I would issue the command
 (assuming that apt-file is installed and initialised):

 ber...@bossiaea:~$ apt-file find include/png.h
 libpng12-dev: /usr/include/png.h

 and then check whether the libpng12-dev package is installed.  If not,
 I would install it and retry.  Perhaps that would be all that is needed
 to compile rgl, but there might be other packages missing.

 If you have a system based on RedHat and Suse, you will have to figure
 out how to use the package management tools on those systems to find
 out which packages have to be installed additionally so that you are
 able to compile rgl.

 HTH.

 Cheers,

Berwin

 == Full address 
 Berwin A Turlach  Tel.: +61 (8) 6488 3338 (secr)
 School of Maths and Stats (M019)+61 (8) 6488 3383 (self)
 The University of Western Australia   FAX : +61 (8) 6488 1028
 35 Stirling Highway
 Crawley WA 6009e-mail: ber...@maths.uwa.edu.au
 Australia
 http://www.maths.uwa.edu.au/~berwinhttp://www.maths.uwa.edu.au/%7Eberwin


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Shapes in barplots

2010-06-04 Thread khush ........
Hi,

I am making barplots . I am using the default shape of barplots with a pipe
but I wants to build bars in various 3d shapes. I have install rgl using
install.packages('rgl') for this purpose, but when I am doing library(rgl),
it shows

Error in library(rgl) : there is no package called 'rgl'

What are the other ways to build such plots of variuos shapes.

Is that *TeachingDemos *replace it..I am not sure how to use it for such
task.

Thanks in advance
Jeet

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Shapes in barplots

2010-06-04 Thread khush ........
Dear Gregory,

Well Thanks for your suggestions. I am no more using TeachingDemos for the
same. I am installing rgl for the same, but one thing I want to ask like I
need to make round ended bars instead of normal one I have to look into rgl
for the same, but is there any option which you think suitable for me in
barplots. Whats your suggestions.

Thank you
Jeet

On Fri, Jun 4, 2010 at 11:09 PM, Greg Snow greg.s...@imail.org wrote:

 The TeachingDemos package does not in any way replace the rgl package.
  They serve very different purposes (the TeachingDemos package does use rgl
 for a couple of functions).

 I would be very surprised if there was anything in the TeachingDemos
 package that would be of help in creating barplots with 3d effects.  3d
 effects distort the information in graphs without adding anything to their
 interpretation.

 If you want to display information, then use the appropriate graph without
 the extra chartjunk.  If you want something to catch the reader's attention,
 use a picture of a kitten.

 --
 Gregory (Greg) L. Snow Ph.D.
 Statistical Data Center
 Intermountain Healthcare
 greg.s...@imail.org
 801.408.8111


  -Original Message-
  From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
  project.org] On Behalf Of khush 
  Sent: Friday, June 04, 2010 1:45 AM
  To: r-help@r-project.org
  Subject: [R] Shapes in barplots
 
  Hi,
 
  I am making barplots . I am using the default shape of barplots with a
  pipe
  but I wants to build bars in various 3d shapes. I have install rgl
  using
  install.packages('rgl') for this purpose, but when I am doing
  library(rgl),
  it shows
 
  Error in library(rgl) : there is no package called 'rgl'
 
  What are the other ways to build such plots of variuos shapes.
 
  Is that *TeachingDemos *replace it..I am not sure how to use it for
  such
  task.
 
  Thanks in advance
  Jeet
 
[[alternative HTML version deleted]]
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-
  guide.html
  and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Help barplots

2010-06-02 Thread khush ........
Hi all,

I want to draw a arrow (small) of any length along with OsCYP right side i.e
parrallel and antiparallel arrows both

 text(os[1], 10.2,  pos = 4, OsCYP, font=1, cex = 1,  col = red)

and

how can I connect two points with dotted line lets say

bp[1 ]10.2  bp[3], 15.2

how to make a dotted line using R, is it possible

Thank you in advance

Jeet


On Tue, Jun 1, 2010 at 4:31 PM, khush  bioinfo.kh...@gmail.comwrote:

 Dear All,

 I am newbie to R, and I wanted to plot a barplots with R and in such a way
 that It will also show me position which I can plot on the bar line.

 Here is my code that I am using to plot,

  chromosome - c(40.2, 35.6, 36.1, 29.6, 31, 29.6, 31, 29.4, 28.2, 23, 23,
 28.2)
 barplot (chromosome, col=purple, xlab=Oryza sativa Chromosomes, border
 = NA, space = 5, ylim = c(0,45))

 I wanted to mark the position say on chromosome 1 (40.2) I need to mark
 10.2 and on other also.
 I also want to set the scale of y axis from 0,5,10,15,20,25,30,35,40,45 i.e
 gap of 5 instead of 10.

 please help me to solve my querygurus.


 Thank you
 Jeet


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Help barplots

2010-06-01 Thread khush ........
Dear All,

I am newbie to R, and I wanted to plot a barplots with R and in such a way
that It will also show me position which I can plot on the bar line.

Here is my code that I am using to plot,

 chromosome - c(40.2, 35.6, 36.1, 29.6, 31, 29.6, 31, 29.4, 28.2, 23, 23,
28.2)
barplot (chromosome, col=purple, xlab=Oryza sativa Chromosomes, border
= NA, space = 5, ylim = c(0,45))

I wanted to mark the position say on chromosome 1 (40.2) I need to mark 10.2
and on other also.
I also want to set the scale of y axis from 0,5,10,15,20,25,30,35,40,45 i.e
gap of 5 instead of 10.

please help me to solve my querygurus.


Thank you
Jeet

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Help barplots

2010-06-01 Thread khush ........
Dear All,

Thank you  very much for your kind help and support I got it.

Jeet

On Tue, Jun 1, 2010 at 5:32 PM, Jim Lemon j...@bitwrit.com.au wrote:

 On 06/01/2010 09:01 PM, khush  wrote:

 Dear All,

 I am newbie to R, and I wanted to plot a barplots with R and in such a way
 that It will also show me position which I can plot on the bar line.

 Here is my code that I am using to plot,

  chromosome- c(40.2, 35.6, 36.1, 29.6, 31, 29.6, 31, 29.4, 28.2, 23, 23,

 28.2)

 barplot (chromosome, col=purple, xlab=Oryza sativa Chromosomes,
 border

 = NA, space = 5, ylim = c(0,45))

 I wanted to mark the position say on chromosome 1 (40.2) I need to mark
 10.2
 and on other also.
 I also want to set the scale of y axis from 0,5,10,15,20,25,30,35,40,45
 i.e
 gap of 5 instead of 10.

 please help me to solve my querygurus.

  Hi Jeet,
 I think you want the x positions of the bars. Get them like this:

 xpos-barplot (chromosome, col=purple,

  xlab=Oryza sativa Chromosomes,
  border = NA, space = 5, ylim = c(0,45))

 Then you can place the extra labels using the values in xpos.
 For the custom y axis, add the argument yaxt=n to your plot command and
 then add the axis later. I suspect you will have to use something like the
 staxlab function in the plotrix package to get all those labels to display.

 Jim


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.