Re: [R] please help generate a square correlation matrix

2024-07-28 Thread Richard O'Keefe
> 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

Re: [R] please help generate a square correlation matrix

2024-07-27 Thread Yuan Chun Ding via R-help
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.

Re: [R] please help generate a square correlation matrix

2024-07-27 Thread Bert Gunter
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. > > >

Re: [R] please help generate a square correlation matrix

2024-07-27 Thread Yuan Chun Ding via R-help
- 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)) { > &

Re: [R] please help generate a square correlation matrix

2024-07-27 Thread Richard O'Keefe
;-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]]

Re: [R] please help generate a square correlation matrix

2024-07-27 Thread Richard O'Keefe
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

Re: [R] please help generate a square correlation matrix

2024-07-25 Thread Bert Gunter
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 >

Re: [R] please help generate a square correlation matrix

2024-07-25 Thread Rui Barradas
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

Re: [R] please help generate a square correlation matrix

2024-07-25 Thread Yuan Chun Ding via R-help
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

Re: [R] please help generate a square correlation matrix

2024-07-25 Thread Yuan Chun Ding via R-help
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

Re: [R] please help generate a square correlation matrix

2024-07-25 Thread Rui Barradas
À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,

[R] please help generate a square correlation matrix

2024-07-25 Thread Yuan Chun Ding via R-help
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