search for: pmean

Displaying 15 results from an estimated 15 matches for "pmean".

Did you mean: mean
2008 Jul 04
2
create a zero matrix & fill
...default(x) :Object cannot be transformed in double) > plot(Variation[1],Variation[2]) Fehler in as.double.default(x) : (list) Objekt kann nicht nach 'double' umgewandelt werden Any suggestion? Hier is the function: #Computing variation of the power VAR<-function(power,length){ tvar=pmean=pmin=pmax=varmax=varmin<-matrix(data=0,ncol=(length-tml0)) for(i in tml0:length){ tvar[i]=i pmean[i]=mean(power[i:(i+deltat)]) pmin[i]=min(power[i:(i+deltat)]) pmax[i]=max(power[i:(i+deltat)]) varmax[i]=100*(pmax[i]-pmean[i])/pmean[i] varmin[i]=100*(pmean[i]-pmin[i])/pmean[i] Results=list(tvar,p...
2007 Dec 28
1
logistic mixed effects models with lmer
...ts except removing poly(wlen_p,2)2. Then I do an anova, and I get: > anova(m17,m18) Data: Models: m18: is_err ~ sex + starts_turn + before_hes + after_hes + before_part + m17: after_part + first_rep + is_open + is_disc + poly(wfreq, m18: 2) + wlen_p + poly(utt_rate, 2) + poly(dur, 2) + pmean + m17: poly(log_prange, 2) + poly(imean, 2) + poly(irange, 2) + m18: (1 | speaker) + (1 | corpus) + (1 | ref) m17: is_err ~ sex + starts_turn + before_hes + after_hes + before_part + m18: after_part + first_rep + is_open + is_disc + poly(wfreq, m17: 2) + poly(wlen_p, 2) + poly(utt_r...
2008 Jul 04
1
initialize a matrix
Dear R users, I'm trying to write a function which returns minimum,maximum,mean of a vector(power) I've done the following : VAR<-function(power,length){ for(i in tml:length)){ tvar[i]<-i pmean[i]<-mean(power[i:i+deltat]) pmin[i]<-min(power[i:i+deltat]) pmax[i]<-max(power[i:i+deltat]) varmax[i]<-100*(pmax[i]-pmean[i])/pmean[i] varmin[i]<-100*(pmean[i]-pmin[i])/pmean[i] Resulats<-list(tvar,pmin,pmax,pmean,varmin,varmax) }} p.s. tml is a variable which is grater than 0 ,...
2008 Jul 04
0
RES: initialize a matrix
...ira, 4 de julho de 2008 11:22 Para: r-help em r-project.org Assunto: [R] initialize a matrix Dear R users, I'm trying to write a function which returns minimum,maximum,mean of a vector(power) I've done the following : VAR<-function(power,length){ for(i in tml:length)){ tvar[i]<-i pmean[i]<-mean(power[i:i+deltat]) pmin[i]<-min(power[i:i+deltat]) pmax[i]<-max(power[i:i+deltat]) varmax[i]<-100*(pmax[i]-pmean[i])/pmean[i] varmin[i]<-100*(pmean[i]-pmin[i])/pmean[i] Resulats<-list(tvar,pmin,pmax,pmean,varmin,varmax) }} p.s. tml is a variable which is grater than 0 ,...
2008 Mar 26
1
cbind and mean by week
...8,28,28,28,29,29,29,29,29,29,29,30,30,30,30,30,30,30) td<-c(0.015,0.012,NA,0.015,NA,0.014,0.014,0.013,0.013,0.013,0.013,NA,0.010,0.013,0.015,0.011,0.014,0.014,0.014,0.014,0.016) pd<-c(0,0,NA,80,NA,45,223,228,224,488,525,NA,80,417,413,373,914,213,651,521,979) x<-data.frame(week,td,pd) x pmean<- tapply(x[,3], x$week, mean) pdmean pdmean<- data.frame(pmean) pdmean xweek <- aggregate(x, list(x$week), mean) xweek Felipe D. Carrillo Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA ____________________________...
2011 Mar 15
4
Element by element mean of a list of matrices
Hi All, is there any effiective and dense/compact method to calculate the mean of a list of - of course coincident - matrices on an element by element basis? The resulting matrix' [i, j]-th element is the mean of the list's matrices' [i, j]-th elements respectively... Iterating by for statement is quite straightforward, but I am seeking for a more elegant solution, and my attempt with
2020 May 20
2
Precision of function mean,bug?
Hello R-dev, Yesterday, while I was testing the newly implemented function pmean in package kit, I noticed a mismatch in the output of the below R expressions. set.seed(123) n=1e3L idx=5 x=rnorm(n) y=rnorm(n) z=rnorm(n) a=(x[idx]+y[idx]+z[idx])/3 b=mean(c(x[idx],y[idx],z[idx])) a==b # [1] FALSE For idx= 1, 2, 3, 4 the last line is equal to TRUE. For 5, 6 and many others the d...
1998 Oct 16
3
mean and sd of each serial position
I want to do something like this in R. If I have three vectors > a1 [1] 1 2 3 > a2 [1] 4 5 6 > a3 [1] 9 10 7 I want to compute 1. A vector that is the mean at each serial position of a1, a2, and a3. so in this example it would have the contents 4.667, 5.667, 5.333333 2. A vector that is the SD at each serial position of a1, a2, and a3. so in this example it would have the contents
2004 Apr 27
4
Problems raised to 1/3 power and NaN
...NaN but z<- -10.72508^(1/3) returns a number. If someone can explain what I am doing incorrectly I would be most grateful. Below is the complete code for the function for reference: HallBoot <- function (x) { #statisics from the original data psd <- sqrt((sum((x-mean(x))^2)/length(x))) pmean <- mean(x) n <- length(x) k <- ((sum((x-mean(x))^3)/(length(x)*psd^3))) #the calulation of Q Qstat <- function (x,mean){ nb = length(x) bmean <- mean(x) Sb <- sqrt((sum((x-mean(x))^2)/nb)) Kb <- ((sum((x-mean(x))^3)/(nb*psd^3))) W <- (bmean-mean)/Sb Q <- W + (Kb *...
2020 May 20
2
Precision of function mean,bug?
...y[idx])/3 > > a2==a > [1] FALSE > > a2==b > [1] TRUE > > -pd > > > On 20 May 2020, at 12:40 , Morgan Morgan <morgan.emailbox at gmail.com> wrote: > > > > Hello R-dev, > > > > Yesterday, while I was testing the newly implemented function pmean in > > package kit, I noticed a mismatch in the output of the below R expressions. > > > > set.seed(123) > > n=1e3L > > idx=5 > > x=rnorm(n) > > y=rnorm(n) > > z=rnorm(n) > > a=(x[idx]+y[idx]+z[idx])/3 > > b=mean(c(x[idx],y[idx],z[idx])) &...
2020 May 20
0
Precision of function mean,bug?
...= on FP operations. Notice also > a2=(z[idx]+x[idx]+y[idx])/3 > a2==a [1] FALSE > a2==b [1] TRUE -pd > On 20 May 2020, at 12:40 , Morgan Morgan <morgan.emailbox at gmail.com> wrote: > > Hello R-dev, > > Yesterday, while I was testing the newly implemented function pmean in > package kit, I noticed a mismatch in the output of the below R expressions. > > set.seed(123) > n=1e3L > idx=5 > x=rnorm(n) > y=rnorm(n) > z=rnorm(n) > a=(x[idx]+y[idx]+z[idx])/3 > b=mean(c(x[idx],y[idx],z[idx])) > a==b > # [1] FALSE > > For idx= 1,...
1999 Aug 03
1
legend in coplot output
..."dados"<-structure (list ( Qu1 = c(1,2,3,4,5,6,7,8,3,2), Qu2 = c(3,4,5,6,7,8,9,9,6,3), Ku1 = structure (factor ( c(1,1,1,1,2,1,2,2,1,1),levels=1:2),.Label=c("Kmin","Kmax")), Ph1 = structure (factor ( c(1,1,3,2,3,3,2,3,2,1),levels=1:3),.Label=c("Pmin","Pmean","Pmax")), Th1 = structure( factor( c(1,1,2,4,3,3,2,4,2,1),levels=1:4),.Label=c("Tmin_in","Tmax_in","Tmin_out","Tmax_out"))), row.names = c("At1","At2","At3","At4","At5","At6","At...
2020 May 21
0
Precision of function mean,bug?
...On 20 May 2020, at 12:40 , Morgan Morgan < >>> morgan.emailbox at gmail.com> wrote: >>> > > > >>> > > > Hello R-dev, >>> > > > >>> > > > Yesterday, while I was testing the newly implemented function >>> pmean in >>> > > > package kit, I noticed a mismatch in the output of the below R >>> expressions. >>> > > > >>> > > > set.seed(123) >>> > > > n=1e3L >>> > > > idx=5 >>> > > > x=rnorm(n) &...
2011 Oct 05
2
mean of 3D arrays
Hi, I have multiple three dimensional arrays. Like this: x1 <- array(rnorm(1000, 1, 2), dim=c(10, 10, 10)) x2 <- array(rnorm(1000, 1, 2), dim=c(10, 10, 10)) x3 <- array(rnorm(1000, 1, 2), dim=c(10, 10, 10)) Now I would like to compute the mean for each corresponding cell. As a result I want to get one 3D array (10 x 10 x 10) in which at position x, y, z is the mean of the
2013 Jun 02
4
Strange behaviour of R graphics copied to PowerPoint
Hello, I am using R to create graphics, especially to plot time series charts. These charts are then copied as metafiles (for best quality) to a PowerPoint presentation and then saved to PDF (via the "Save As" dialog"). Attached is two pictures. The first picture shows how my chart looks like in the R Graphics window, and the second picture shows how the chart becomes after saving