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
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]
}
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
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
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
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
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:
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
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
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
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
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
. 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
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?
-
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
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
16 matches
Mail list logo