[R] How to average outputs

2011-04-28 Thread Dat Mai
Hello, I am trying to create a matrix that generates an output from 2 inputs. The problem I have is that I'm assigning a large set of data to various categories (that are used for the matrix). This technically means that I will have multiple output values for each unique set of inputs--I want to a

[R] Subscript out of Bounds

2011-04-28 Thread Dat Mai
I currently have this code: for(j in 2:n){ for(i in 1:(j-1)){ # Make sure the inputs are for the matrix "m" input1=rownames(m)[i] input2=colnames(m)[j] q=t[(t$Rec1==input1 & t$Rec2==input2),output] if(length(q)==0){ q=t[(t$Rec1==input2 & t$Rec2==input1),output] }

Re: [R] Subscript out of Bounds

2011-04-28 Thread Dat Mai
Great! I got it. Thanks a bunch. On Thu, Apr 28, 2011 at 4:02 PM, Duncan Murdoch wrote: > On 28/04/2011 3:49 PM, Dat Mai wrote: > >> I currently have this code: >> >> for(j in 2:n){ >> for(i in 1:(j-1)){ >> >> # Make sure the inputs are for

[R] Variance

2011-04-28 Thread Dat Mai
I'm trying to find the variance of various outputs in a matrix: for(l in 2:vl){ for(o in 1:(l-1)){ # Make sure the inputs are for the matrix "m" input3=rownames(v)[o] input4=colnames(v)[l] r=t[(t$Rec1==input3 & t$Rec2==input4),output] if(length(r)==0){ r=t[(t$Rec1==i

Re: [R] Variance

2011-04-28 Thread Dat Mai
ted, minimal, > self-contained, reproducible code. Please consider submitting that > with future questions. > > I hope that this helps, > > Andrew. > > > On Thu, Apr 28, 2011 at 05:58:24PM -0400, Dat Mai wrote: > > I'm trying to find the variance of various out

[R] How to alter circle size

2011-05-06 Thread Dat Mai
list(x = list(rot = 45)), col.regions=col.sch, panel = panel.corrgram.2, label = num.circ, xlab="", ylab="", main=paste(output,"receptor response")) print(k) -- Best, Dat Mai PhD Rotation Student Albert Einstein College of Medicine [[alternative HTML version del

Re: [R] How to alter circle size

2011-05-09 Thread Dat Mai
Thanks for the help! Though, when I do this, I get a message saying "Error using packet 1 value where TRUE/FALSE." Would that have anything to do with this set of code? On Sun, May 8, 2011 at 3:00 PM, Deepayan Sarkar wrote: > On Fri, May 6, 2011 at 10:21 PM, Dat Mai wrote:

[R] Setting NA to blank

2011-05-09 Thread Dat Mai
Hey All, I have a matrix m, and I wish to set all the NA values to blank. How would I do so? -- Best, Dat Mai PhD Rotation Student Albert Einstein College of Medicine [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] How to alter circle size

2011-05-09 Thread Dat Mai
All right then--I shall get bash away. Thanks a lot. On Mon, May 9, 2011 at 2:55 PM, Deepayan Sarkar wrote: > On Mon, May 9, 2011 at 8:23 PM, Dat Mai wrote: > > Thanks for the help! Though, when I do this, I get a message saying > "Error > > using packet 1 value where

Re: [R] Setting NA to blank

2011-05-09 Thread Dat Mai
Thank you kind sir! On Mon, May 9, 2011 at 3:25 PM, John Kane wrote: > > (mat <- matrix(c(1,2,3,NA),2)) > mat[is.na(mat)] <- " " > mat > > But if you have a numerical matrix it coverts the matrix to character. > > --- On Mon, 5/9/11, Dat Mai wro

Re: [R] Setting NA to blank

2011-05-09 Thread Dat Mai
other > computational software that (e.g.) expects missing > values to be represented by a blank, or some "null" > representation, then it may not be so straightforward. > > So, if that might be an issue, please describe for us > how you intend to use the

[R] Reordering inputs

2011-05-11 Thread Dat Mai
go about making sure that the order of inputs of both heatmaps are the same? As it is right now, I can only control the the order of the inputs by using the decreasing=TRUE/FALSE function, but that only serves to reorder the matrix by the output values. -- Best, Dat Mai PhD Rotation Student Albert

[R] Trying to install rJava

2011-05-20 Thread Dat Mai
. How would I solve this issue? -- Best, Dat Mai PhD Rotation Student Albert Einstein College of Medicine [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] matrix not working

2011-05-26 Thread Dat Mai
q=NA } r[j,i]=q r[i,j]=q r[j,j]=q } } The result is a matrix with the appropriate dimensions, but everything is filled with NA instead of the rankings of the various combinations. I'd like for the matrix to be filled with the ranking values--what have I done wrong? -

Re: [R] matrix not working

2011-05-26 Thread Dat Mai
ngle mode, including "character", "list", and > "logical". > > -- > david. > > > >> >> --- On Thu, 5/26/11, Dat Mai wrote: >> >> From: Dat Mai >> Subject: [R] matrix not working >> To: r-help@r-project.org

[R] filling in a dataframe with another dataframe

2011-05-31 Thread Dat Mai
Thanks a bunch for your time -- Best, Dat Mai PhD Rotation Student Albert Einstein College of Medicine [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th