search for: cum

Displaying 20 results from an estimated 291 matches for "cum".

Did you mean: com
2007 Mar 12
1
How to avoid a for-loop?
Hi all, as I am trying to move slowly from just "working" to "good" code, I'd like to ask if there's a smarter way than using a for-loop in tasks like the example below. I need to obtain the extrema of the cumulated sum of a detrended time series. The following code is currently used, please have a look at the comments for my questions and remarks: system.time({ X <- rnorm(10000) X.length <- length(X) X.cum.sum <- cumsum(X) X.cum.mean <- cummean(X) # initializ...
2008 Jul 14
0
swap_tail macro in pnorm.c
Hello, Looking over the swap_tail macro in pnorm.c, the comment inside the code indicates it is to swap the values of '*cum' and '*ccum'. According to the code below that is taken from the source file, the swap functionality is dependent on what values are provided for 'x' and 'lower'. #define swap_tail \ if (x > 0.) {/* swap ccum <--> cum */ \ temp = *cum; i...
2004 Jun 11
1
lattice: cumsum and xyplot
I want to display cumulative summary functions with lattice. First I tried to get cumulated data: library(lattice) data(barley) d.cum <- with( barley, by( yield, INDICES=list(site=site,year=year), FUN=cumsum ) ) I got a list of vectors. I tried to get a dataframe which I could use in xyplot. But neithe...
2003 Jul 24
0
Re: I am puzzled about something in pnorm in R (PR#3545)
sorry for the late reply. i dunno if anyone ever wrote you back. although perhaps not written for clarity, i think what appears in the code is correct. the routine only guarantees that one of cum or ccum has a valid return value depending on i_tail (the other might as well be garbage, but that isn't what's returned). j On Wed, 9 Jul 2003 Henrik.Seidel@schering.de wrote: > Hello, > > I am a bit puzzled about the "swap_tail" macro in pnorm.c of the R sources....
2011 Jul 23
2
sum part of a vector
Dear colleagues, I have a data set that looks roughly like this; mydat<-data.frame(state=c(rep("Alabama", 5), rep("Delaware", 5), rep("California", 5)), news=runif(15, min=0, max=8), cum.news=rep(0, 15)) For each state, I'd like to cumulatively sum the value of "news" and make that put that value in cum.news. I'm trying as follows but I get really weird results. One thing is that it keeps counting 0's as 1. for (i in levels(mydat$state)) { mydat[mydat$stat...
2007 Oct 26
5
help
hello, please can anyone help me out. Am a new user of R program. Am having problem with this code below, not getting the expected results. 1. Each m, the cumulative sum should be 1.000 but the 2nd and 3rd m returned 2.000 and 3.000 instead of 1.000. 2. to get the LCL(m) and UCL(m) for each m base on these instructions if out.cum > 0.025 then LCL(m)= y-1 if out.cum >0.975 then ucl(m)= y-1 how do I code these instructions into th...
2010 Dec 07
3
understanding output of tapply/by cumsum
Dear R-users, I have a dataset with categories and numbers. I would like to compute and add cumulative numbers to the dataset. I do not understand the structure of by(...) or tapply(...) output enough to handle it. Here a small example -------------- d<-expand.grid(a=1:5,b=1:3,c=1:2) d$n = 10 * d$a + d$b +0.1* d$c Sn<-by(d$n,list(d$a,d$c),cumsum) str(Sn) --------- List of 10 $ : num...
2008 Nov 24
3
count the cumulative for each subject
I have a data set like the following: subject visit x1 1 1 0.5 1 2 1.2 1 3 0.7 2 1 0.4 2 2 0.6 2 3 1.0 ..... where x1 is the interval between the two visits. Now I want to calculate the cumulative intervals since the beinging, for example subject visit x1 cum 1 1 0.5 0.5 1 2 1.2 0.5+1.2 1 3 0.7 0.5+1.2+0.7 2 1 0.4 0.4 2 2 0.6 0.4+0.6 2 3 1.0 0.4+0.6+1.0 ..... is there an easy to generate the last veriable cum? The number of visits for each subject may be different. I also want to...
2018 Apr 05
4
Can’t authenticate any users after upgrade.
...lbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } ssl = required ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_cipher_list = PROFILE=SYSTEM ssl_dh = # hidden, use -P to show it ssl_key = # hidden, use -P to show it userdb { driver = passwd } -- Kevin J. Cummings cummings at kjchome.homeip.net cummings at kjc386.framingham.ma.us kjchome at icloud.com Registered Linux User #1232 (http://www.linuxcounter.net/) -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180404/de...
2015 May 17
1
The function cummax() seems to have a bug.
Hi, The function cummax() seems to have a bug. > x <- c(NA, 0) > storage.mode(x) <- "integer" > cummax(x) [1] NA 0 The correct result of this case should be NA NA. The mistake in [ https://github.com/wch/r-source/blob/trunk/src/main/cum.c#L130-L136] may be the reason. Best Regards, Dongcan...
2010 Feb 01
0
Payroll cum HR management application
Hi Could anyone please suggest a good Payroll cum HR management open source rails application? Thanks Tom -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6...
2007 Oct 29
2
help please
hello, please can anyone help me out. Am a new user of R program. Am having problem with this code below, not getting the expected results. Each m, the cumulative sum should be 1.000 but the 2nd and 3rd m returned 2.000 and 3.000 instead of 1.000. thanks Aruike pp=function(x,n,M){z=1.0;a=2.3071430;b=7.266064;H=3 out.h=c() out.y=c() out.m=c() out.prob=c() for(h in 1:H){ for(m in 1:M){ for(...
2005 Nov 08
1
Can someone Help in nls() package
...4,113.2, 97,112,115,126,136.6,140.6,147.2,151.6,157.8,170,202,210.4,221.2,224.4,248.2,266, 277,291.4,392,461.2,470,418,410.8,395.6,365.2,189.4,43.4,33.2,32,29,26,26,25.6,24.6, 24,23.4,18.4,17.6,15.8,13.6,10.6,8.4,6.4,5.4,4.2,3.6,2.7)) times<-c(0:60) f <- function(t,xx,pars){ Cur<- xx[1] Cum<- xx[2] a <- pars[1] b <- pars[2] dCur <- a*Cur-b*Cur*Cum^2 dCum <- Cur list(c(dCur,dCum)) } require(nls) fit <- nls(Cur ~ lsoda(c(Cur=1,Cum=1), times, f, c(a=a, b=b))[,2], data=dat, start=list(a=2.5, b=.01), trace=T ) print(coef(...
2010 Dec 03
2
difference between linear model & scatterplot matrix
...Correlation") #command for linear model and summary() >a<- lm ( dmp ~ Latitude + Longitude + Year + Tot.Prod + Herbaceous.Prod.kg.ha. + Leaf.Prod + Tree.bio + Total_Density + X1st.SpecieDensity.trunk.ha.+ X2nd.SpecieDensity.trunk.ha.+ Herb_Specie_Index1 + iNDVI.JASO. + RFE.Cum.JASO., data=senegal5 ) >summary(a) Call: lm(formula = dmp ~ Latitude + Longitude + Year + Tot.Prod + Herbaceous.Prod.kg.ha. + Leaf.Prod + Tree.bio + Total_Density + X1st.SpecieDensity.trunk.ha. + X2nd.SpecieDensity.trunk.ha. + Herb_Specie_Index1 + iNDVI.JASO. + RFE.Cum....
2007 Oct 25
1
help
hello, please can anyone help me out. Am a new user of R program. Am having problem with this code below, not getting the expected results. 1. Each m, the cumulative sum should be 1.000 but the 2nd and 3rd m returned 2.000 and 3.000 instead of 1.000. 2. to get the LCL(m) and UCL(m) for each m base on these instructions if out.cum > 0.025 then LCL(m)= y-1 if out.cum >0.975 then ucl(m)= y-1 how do I code these instructions into...
2013 Nov 28
1
Relative Cumulative Frequency of Event Occurence
Hi, My objective is to calculate "Relative (Cumulative) Frequency of Event Occurrence" - something as follows: Sample.Number 1st.Fly 2nd.Fly Did.E.occur? Relative.Cum.Frequency.of.E 1 G B No 0.000 2 B B Yes 0.500 3 B G No 0.333 4 G B No 0.250 5 G G Yes 0.400 6 G B No 0.333 7 B B Yes 0.429 8 G G Yes 0.500 9 G B No 0.444 10 B B Yes 0.500 P...
2012 Sep 26
2
(new) director issues in 2.1.10
Timo - I upgraded to 2.1.10 on our director servers two nights ago and apart from errors associated with the directors processes restarting everything looked great for ~24 hours until I failed our the real servers last night to update the nfs mount options for the spools. I followed the suggested procedure for each backend server, just run on one of the directors, which seemed to work as
2013 Mar 19
3
What would be the best tutorial cum reference doc for ZFS
as used on Illumos? I''ve seen a few tutorials written by people who obviously are very action oriented; afterwards you find you have worn your keyboard down a bit and not learned a lot at all, at least not in the sense of understanding what zfs is and what it does and why things are the way they are. I''m looking for something that would make me afterwards understand what,
2011 Dec 30
3
vertically stacked area plot?
Dear all, I would like to create a vertically stacked area chart in R. The data are presented in the attached text file. I would like to see the trend in values for the different groups with sediment depth (that's why I would like to create a vertically stacked chart; normally sed_depth should be = x, but I want it plotted on the y-axis). In the packages available to create stacked area
2008 Jan 05
2
Cumulative sum of vector
Hi, Maybe I have not been looking in the right spot, but, I have not been able to fine a command to automatically calculate the running cumulative sum of a vector. Is there such a command? Example of current code: > eig$values [1] 678.365651 6.769697 2.853783 > prop<-eig$values/sum(eig$values) > prop [1] 0.986012163 0.009839832 0.004148005 > cum<-c(prop[1],sum(prop[1:2]),sum(prop[1:3])) > cum [1] 0.98601...