search for: tem2

Displaying 11 results from an estimated 11 matches for "tem2".

Did you mean: tem
2005 Oct 14
2
Help with lattice, regressions and respective lines
# Dear R list, # # I'm needing help with lattice, regression and respective lines. # My data is below: bra = gl(2, 24, label = c('c', 's')) em = rep(gl(3, 8, label = c('po', 'pov', 'ce')), 2) tem = rep(c(0, 0, 30, 30, 60, 60, 90, 90), 6) tem2 = tem^2 r = rep(1:2, 24) y = c(40.58, 44.85, 32.55, 35.68, 64.86, 51.95, 42.52, 52.21, 40.58, 44.85, 33.46, 46.09, 12.75, 18.01, 16.82, 13.69, 40.58, 44.85, 34.45, 29.89, 34.91, 28.10, 27.52, 22.24, 48.68, 47.25, 45.58, 45.33, 41.03, 51.20, 45.85, 54.45,...
2013 Mar 06
2
How to combine conditional argument and logical argument in R to create subset of data...
Dear R user I have data created using code below b<-matrix(2:21,nrow=4) b[,1:3]=NA b[4,2]=5 b[3,1]=6 Now the data is > b [,1] [,2] [,3] [,4] [,5] [1,] NA NA NA 14 18 [2,] NA NA NA 15 19 [3,] 6 NA NA 16 20 [4,] NA 5 NA 17 21 I want to keep data in column 4 greater than 15 and the value in column 1 & 2 either greater than 4
2024 Jul 25
1
please help generate a square correlation matrix
...dimnames = list(names(dat), names(dat))) for(i in 1:22) { #i=1 x <- dat[[i]] for(j in (1:22)) { #j=2 if(i == j) { # there's nothing to test, assign correlation 1 r[i, j] <- 1 } else { tmp <-cbind(x,dat[[j]]) row0 <-rowSums(tmp) tem2 <-tmp[row0!=0,] tmp3 <- cor.test(tem2[,1],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 <r-help-bounces at r-project.org> On Behalf Of Yuan Chun Ding via R-help Sent: Thursday, J...
2024 Jul 25
1
please help generate a square correlation matrix
...> #i=1 > x <- dat[[i]] > for(j in (1:22)) { > #j=2 > if(i == j) { > # there's nothing to test, assign correlation 1 > r[i, j] <- 1 > } else { > tmp <-cbind(x,dat[[j]]) > row0 <-rowSums(tmp) > tem2 <-tmp[row0!=0,] > tmp3 <- cor.test(tem2[,1],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 <r-help-bounces at r-project.org> O...
2024 Jul 26
1
please help generate a square correlation matrix
...t; for(j in (1:22)) { > > #j=2 > > if(i == j) { > > # there's nothing to test, assign correlation 1 > > r[i, j] <- 1 > > } else { > > tmp <-cbind(x,dat[[j]]) > > row0 <-rowSums(tmp) > > tem2 <-tmp[row0!=0,] > > tmp3 <- cor.test(tem2[,1],tem2[,2]) > > r[i, j] <- tmp3$estimate > > P[i, j] <- tmp3$p.value > > } > > } > > } > > r<-as.data.frame(r) > > P<-as.data.frame(P) > > > > From:...
2024 Jul 27
1
please help generate a square correlation matrix
...#j=2 > > > if(i == j) { > > > # there's nothing to test, assign correlation 1 > > > r[i, j] <- 1 > > > } else { > > > tmp <-cbind(x,dat[[j]]) > > > row0 <-rowSums(tmp) > > > tem2 <-tmp[row0!=0,] > > > tmp3 <- cor.test(tem2[,1],tem2[,2]) > > > r[i, j] <- tmp3$estimate > > > P[i, j] <- tmp3$p.value > > > } > > > } > > > } > > > r<-as.data.frame(r) > > > P<-as...
2024 Jul 25
1
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 <ruipbarradas at sapo.pt> Sent: Thursday, July 25, 2024 11:15 AM To: Yuan Chun Ding <ycding at coh.org>; r-help at r-project.org Subject: Re: [R] please help generate a square correlation matrix ?s 17:?39 de 25/07/2024, Yuan Chun Ding via R-help
2024 Jul 27
1
please help generate a square correlation matrix
...if(i == j) { > > > > # there's nothing to test, assign correlation 1 > > > > r[i, j] <- 1 > > > > } else { > > > > tmp <-cbind(x,dat[[j]]) > > > > row0 <-rowSums(tmp) > > > > tem2 <-tmp[row0!=0,] > > > > tmp3 <- cor.test(tem2[,1],tem2[,2]) > > > > r[i, j] <- tmp3$estimate > > > > P[i, j] <- tmp3$p.value > > > > } > > > > } > > > > } > > > > r<-as.da...
2024 Jul 27
1
please help generate a square correlation matrix
...= j) { > > > > # there's nothing to test, assign correlation 1 > > > > r[i, j] <- 1 > > > > } else { > > > > tmp <-cbind(x,dat[[j]]) > > > > row0 <-rowSums(tmp) > > > > tem2 <-tmp[row0!=0,] > > > > tmp3 <- cor.test(tem2[,1],tem2[,2]) > > > > r[i, j] <- tmp3$estimate > > > > P[i, j] <- tmp3$p.value > > > > } > > > > } > > > > } > > > > r&lt...
2024 Jul 27
1
please help generate a square correlation matrix
...9;s nothing to test, assign correlation 1 > > > > > > r[i, j] <- 1 > > > > > > } else { > > > > > > tmp <-cbind(x,dat[[j]]) > > > > > > row0 <-rowSums(tmp) > > > > > > tem2 <-tmp[row0!=0,] > > > > > > tmp3 <- cor.test(tem2[,1],tem2[,2]) > > > > > > r[i, j] <- tmp3$estimate > > > > > > P[i, j] <- tmp3$p.value > > > > > > } > > > > > > } &gt...
2024 Jul 28
1
please help generate a square correlation matrix
...g to test, assign correlation 1 > > > > > > r[i, j] <- 1 > > > > > > } else { > > > > > > tmp <-cbind(x,dat[[j]]) > > > > > > row0 <-rowSums(tmp) > > > > > > tem2 <-tmp[row0!=0,] > > > > > > tmp3 <- cor.test(tem2[,1],tem2[,2]) > > > > > > r[i, j] <- tmp3$estimate > > > > > > P[i, j] <- tmp3$p.value > > > > > > } > > > > > &gt...