[R] Specific criteria for color palette using heatmap.2

2009-09-21 Thread bioinformatics_guy
I'm trying to display the probability space of a function and wanted to see specifically where the maximum posterior probability is. data=read.table("PosteriorData",header=F) mat=as.matrix(data) heatmap.2(mat/max(mat,na.rm=T),dendrogram=c("none"),trace=c("none"), Rowv=F,Colv=F,lab

Re: [R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread bioinformatics_guy
dn't find out how to lable the axis the way I wanted to. Schalk Heunis wrote: > > Hi bioinformatics_guy > I think you are looking for the "image" function: > image(mat) > > The heatmap.2 function does hierarchical clustering on rows and columns > and > the

[R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread bioinformatics_guy
I have a file of the following form -11 -10 -9 -8 -10 -9 -8 NA -9 -7NA NA -8NA NA NA So basically a NxN matrix of log scores. I want to get a heatmap of these log scores but I'm having a problem. I'm using the following code library(gplots) data=read.table("filein.txt",header=

[R] QQplots of probability vector data

2009-06-22 Thread bioinformatics_guy
I'm trying to determine if a set of data is normal from a qq plot but seem to be having a bit of difficulty. I have a file of the following form 9 36 3 37 6 38 7 39 . where the left column is the frequency of the number in the right column. I've found the prob

[R] if statement of a vector

2009-02-23 Thread bioinformatics_guy
right now I have a vector of about 1000 points. I'd like to iterate through each of these points and and test if it is greater than a certain value and if not, throw it out. x=vector y=empty vector j=0 for i (0..length[vector]) if x[i] > 10 y[j] = x[i] j++ Thats basical

[R] Linear Regression in R

2008-10-01 Thread bioinformatics_guy
I've attached below the output of a program I am running. What I want to do is, get the equation for each of the lines and determine what the overall equation is that is applicable to every scenario (I know that each line is of multiple of the proceeding line; as in the bottom's coefficient is 1x

[R] Pattern match in R

2008-09-30 Thread bioinformatics_guy
I want to make sure this piece of code I wrote is doing what I want it to do. ll<-function(string) { grep(string,dir(),value=T) } subdir = ll("Coverage_[1-9][0-9]$") I basically wrote a little function that would grab all the files of form Coverage_[0-99] The way I wrote it, will it g

Re: [R] Scripting in R -- pattern matching, logic, system calls, the works!

2008-09-16 Thread bioinformatics_guy
> >## optional, to restrict to only certain files >filenum <- as.numeric(gsub( 'Length_', '', filename)) > >## skip to next file if it isn't in the correct number range >if (filenum > 50 | filenum < 20) next > >## a command t

Re: [R] plotCI -- multiple plots on same graph

2008-09-12 Thread bioinformatics_guy
worked! bioinformatics_guy wrote: > > I have a bunch of lines I want to plot using plotCI() > > What Id like to know is, how can I connect the points with a line and how > can I print multiple lines on the same graph? > -- View this message in context: http://www.nabble.com/

[R] plotCI -- multiple plots on same graph

2008-09-11 Thread bioinformatics_guy
I have a bunch of lines I want to plot using plotCI() What Id like to know is, how can I connect the points with a line and how can I print multiple lines on the same graph? -- View this message in context: http://www.nabble.com/plotCImultiple-plots-on-same-graph-tp19435198p19435198.html Se