Displaying 5 results from an estimated 5 matches for "peak2".
Did you mean:
peak
2013 Mar 22
3
Distance calculation
...ot;)
#Subset
dat2<-dat1[1:5,]
res1<-do.call(cbind,lapply(seq_len(nrow(dat2)),function(i) do.call(rbind,lapply(split(rbind(dat2[i,],dat2[-i,]),1:nrow(rbind(dat2[i,],dat2[-i,]))), function(x) {x1<-rbind(dat2[i,],x); abs((x1$Peak1.v.[1]-x1$Peak1.v.[2])*(x1$Peak1.t.[1]-x1$Peak1.t.[2]))+abs((x1$Peak2.v.[1]-x1$Peak2.v.[2])*(x1$Peak2.t.[1]-x1$Peak2.t.[2]))+abs((x1$Npeak1.v.[1]-x1$Npeak1.v.[2])*(x1$Npeak1.t.[1]-x1$Npeak1.t.[2]))+abs((x1$Npeak2.v.[1]-x1$Npeak2.v.[2])*(x1$Npeak2.t.[1]-x1$Npeak2.t.[2]))}))))
res2<-do.call(cbind,lapply(seq_len(ncol(res1)),function(i) c(c(tail(res1[seq(1,i,1),i],-1)...
2010 Aug 27
1
pairwise correlations for large dataset
...he current rate, it will take a few weeks to finish running. I'm looking for suggestions on performing the calculations more efficiently.
Here's what I currently have:
for (j in 1:dim(genes2)[1]){
for(i in 1:dim(genes1)[1]){
peak1<-as.vector(t(expression.data[genes1[i,1],]))
peak2<-as.vector(t(expression.data[genes2[j,1],]))
Cor.matrix[i,j]<-cor(peak1,peak2,method='s')
}
}
Thanks so much.
Alayne
2005 Feb 15
1
matlab norm(h) command in R: sqrt(sum(h^2)) - use in an expression
...000
plot(eval(h), type = 'l')
# however this yields an error
h <- h/sqrt(sum(h^2))
Error in h^2 : non-numeric argument to binary operator
what shall I do to get the matlab: h = h/norm(h) implemented in R?
thanks for a hint
christoph
----
# parameters
peak1 <- 5.4
fwhm1 <- 5.2
peak2 <- 10.8
fwhm2 <- 7.35
dip <- 0.35
b1 <- 0.9 # dispersion
b2 <- 0.9 #dispersion
a1 <- peak1/b1
a2 <- peak2/b2
d1 <- a1*b1
d2 <- a2*b2
c <- dip
2007 Oct 13
2
How to identify the two largest peaks in a trimodal distribution
...re are only two peaks:
CnBdens<-density(Ys/Xs) #probability density function for ratio of Ys
to Xs
for(p in 1:512) ifelse(CnBdens$y[p]>CnBdens$y[p-1],peak1<-p,break)
#identifies first peak in probability distribution
for(p in 1:512) ifelse(CnBdens$y[512-p]>CnBdens$y[512-p
+1],peak2<-512-p,break) #identifies second peak in probability
distribution
but the simulation sometimes produces a small third peak at one end
of the distribution. Is there any simple way to identify the two
highest maxima in a trimodal distribution?
Thanks for any help
Rob Knell
School of B...
2005 Feb 15
0
matlab norm(h) command in R: sqrt(sum(h^2)) - use in an e xpression
...h) beforehand.
Andy
> Error in h^2 : non-numeric argument to binary operator
>
> what shall I do to get the matlab: h = h/norm(h) implemented in R?
>
> thanks for a hint
>
> christoph
>
>
> ----
> # parameters
> peak1 <- 5.4
> fwhm1 <- 5.2
> peak2 <- 10.8
> fwhm2 <- 7.35
> dip <- 0.35
>
> b1 <- 0.9 # dispersion
> b2 <- 0.9 #dispersion
> a1 <- peak1/b1
> a2 <- peak2/b2
> d1 <- a1*b1
> d2 <- a2*b2
> c <- dip
>
> ______________________________________________
> R-help at sta...