> so I want to measure how strong the exclusiveness between two specific
> > mutation types across those patients with at least one mutation type.
>
> >
>
> > Then put the pair of mutations with strong negative mutations on the top
> > rows by order of negative mutat
O'Keefe ; r-help@r-project.org
Subject: Re: [R] please help generate a square correlation matrix
Your expanded explanation helps clarify your intent. Herewith some comments. Of
course, feel free to ignore and not respond. And, as always, my apologies if I
have failed to comprehend your intent.
gative correlated mutations,
> the drug treatment for cancer patients is usually only for those patients
> carrying the specific mutation,
>
> then it is informative to know how strong the negative correlation when
> considering different combination of treatment strategies.
>
>
>
- P <- matrix(NA, nrow = 22L, ncol = 22L,
> > > > dimnames = list(names(dat), names(dat)))
> > > >
> > > > for(i in 1:22) {
> > > >#i=1
> > > > x <- dat[[i]]
> > > >for(j in (1:22)) {
> &
;-gene22mut.coded
> > > > r <- P <- matrix(NA, nrow = 22L, ncol = 22L,
> > > > dimnames = list(names(dat), names(dat)))
> > > >
> > > > for(i in 1:22) {
> > > >#i=1
> > > >x <- dat[[i]]
t: Thursday, July 25, 2024 11:26 AM
> > > To: Rui Barradas ; r-help@r-project.org
> > > Subject: Re: [R] please help generate a square correlation matrix
> > >
> > > HI Rui, Thank you for the help! You did not remove a row if zero values
> > > exist in bot
tem2[,2])
> >r[i, j] <- tmp3$estimate
> > P[i, j] <- tmp3$p.value
> > }
> >}
> > }
> > r<-as.data.frame(r)
> > P<-as.data.frame(P)
> >
> > From: R-help On Behalf Of Yuan Chun Ding via
> > R-help
>
5, 2024 11:26 AM
To: Rui Barradas ; r-help@r-project.org
Subject: Re: [R] please help generate a square correlation matrix
HI Rui, Thank you for the help! You did not remove a row if zero values exist in both
column pair, right? Ding From: Rui Barradas Sent: Thursday,
July 25, 2024 11: 15 AM To: Yua
ot remove a row if zero values exist in both column pair, right?
Ding
From: Rui Barradas mailto:ruipbarra...@sapo.pt>>
Sent: Thursday, July 25, 2024 11:15 AM
To: Yuan Chun Ding mailto:ycd...@coh.org>>;
r-help@r-project.org<mailto:r-help@r-project.org>
Subject: Re: [R] please h
HI Rui,
Thank you for the help!
You did not remove a row if zero values exist in both column pair, right?
Ding
From: Rui Barradas
Sent: Thursday, July 25, 2024 11:15 AM
To: Yuan Chun Ding ; r-help@r-project.org
Subject: Re: [R] please help generate a square correlation matrix
Às 17: 39 de
Às 17:39 de 25/07/2024, Yuan Chun Ding via R-help escreveu:
Hi R users,
I generated a square correlation matrix for the dat dataframe below;
dat<-data.frame(g1=c(1,0,0,1,1,1,0,0,0),
g2=c(0,1,0,1,0,1,1,0,0),
g3=c(1,1,0,0,0,1,0,0,0),
g4=c(0,1,0,1,
Hi R users,
I generated a square correlation matrix for the dat dataframe below;
dat<-data.frame(g1=c(1,0,0,1,1,1,0,0,0),
g2=c(0,1,0,1,0,1,1,0,0),
g3=c(1,1,0,0,0,1,0,0,0),
g4=c(0,1,0,1,1,1,1,1,0))
library("Hmisc")
dat.rcorr = rcorr(as.matrix(dat))
da
12 matches
Mail list logo