search for: tot

Displaying 20 results from an estimated 1378 matches for "tot".

Did you mean: to
2007 Sep 10
2
Are the error messages of ConstrOptim() consisten with each other?
...rameters, how come the lambda1 that is not missing in the first 2 cases suddently become missing? For your convenience, I put the complete code below: Best Wishes Yuchen Luo ######################################## rm(list = ls()) mat=5 rint=c(4.33,4.22,4.27,4.43,4.43,4.44,4.45,4.65,4.77,4.77) tot=rep(13319.17,10) sh=rep(1553656,10) sigmae=c(0.172239074,0.188209271,0.193703774,0.172659891,0.164427247,0.24602361,0.173555309,0.186701165,0.193150456, 0.1857315601) ss=c(56.49,56.39,56.55,57.49,57.37,55.02,56.02,54.35,54.09, 54.67) orange=rep(21.25,10) apple2=expression(rint*(1.0-rec)*(1.0-(pnor...
2007 Sep 09
2
What does it mean by "initial value not available"?
...not belong to any of the above cases. I have attached my code bellow and could you please help me take a look? Best Wishes Yuchen Luo rm(list = ls()) ui=matrix(c(1,-1,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,1,-1),6,3) ci=c(0,-0.5,0,-2,0,-0.6) apple=expression(rr*(1.0-rec)*(1.0-(pnorm(-lambda/2.0+log(((ss+(tot/sh* 1000.0)*lbar)/(tot/sh*1000.0 )/lbar*exp(lambda*lambda)))/lambda)-((ss+(tot/sh*1000.0)*lbar)/(tot/sh* 1000.0)/lbar*exp(lambda*lambda))*pnorm(-lambda/2.0-log(((ss+(tot/sh*1000.0 )*lbar)/(tot/sh*1000.0 )/lbar*exp(lambda*lambda)))/lambda))+(exp(rr*(lambda*lambda/(sigmae*ss/(ss+lbar*(tot/sh* 1000.0)...
2016 Apr 22
0
R2BayesX help
...terms exceed 20, the code stops working. Here is a piece of toy code. rm(list=ls()) library(BayesX) library(R2BayesX) #data generating model f2<-function(x1,x2,x3,x4) { y<-2*sin(pi*x1)*1.5+exp(2*x2)/3+2 * sin(4 * pi * (x3 - 0.2) *(x4 - 0.7)) } #the dataset nsample<-40 #sample size x1.tot<-runif(nsample,0,1) x2.tot<-runif(nsample,0,1) x3.tot<-runif(nsample,0,1) x4.tot<-runif(nsample,0,1) x5.tot<-runif(nsample,0,1) x6.tot<-runif(nsample,0,1) x7.tot<-runif(nsample,0,1) pnoise<-0.2 eta<-f2(x1.tot,x2.tot,x3.tot,x4.tot) y.tot<-eta+pnoise*rnorm(nsample,0,1)...
2012 Aug 07
2
Error using ddply inside user-defined function
...e the function recognizes vr1, etc, in other parts of the function. Here's some code: # create dataset PROV.PM.FBCTS <- c(0.00 ,0.00, 33205.19, 25994.56, 23351.37, 26959.56 ,27632.58, 26076.24, 0.00, 0.00 , 6741.42, 18665.09 ,18129.59 ,21468.39 ,21294.60 ,22764.82, 26076.73) FBCTS.INV.TOT <- c(0 , 0, 958612, 487990, 413344, 573347, 870307, 552681 , 0, 0 , 163831 , 400161 , 353000, 358322 , 489969, 147379, 1022769) FBCTS.REC.TOT <- c(0 , 0, 1638818 ,297119 , 299436 ,414164 , 515735, 529001 , 0, 0 , 427341 , 625893 ,437854 , 407091, 425119 , 866...
2007 Aug 04
2
multiple nls - next fit even after convergence problem
...curves I have, obviously for some of them I encounter conversion problems. I'd like for my function to keep going to the next curve and store the fact that for curve number X I had a convergence problem. This is my original function : comp.fit.2<-function(tab) { fit.log<-nls(surf.vert.tot ~ 100/(1+exp(((log(81))/a)*(sum.T.levee-b))), start=list( a=ifelse(sum(tab$surf.vert.tot>76)<1 | sum(tab$surf.vert.tot<15)<1,400,-max(tab$sum.T.levee[tab$surf.vert.tot>76],na.rm=T)+min(tab$sum.T.levee[tab$surf.vert.tot<15],na.rm=T)), b=tab$sum.T.levee[abs(tab$surf.vert.tot-50)==mi...
2001 Sep 20
0
G-test : log-likelihood ratio test
...y(is.na(x))) stop("all entries of x must be nonnegative and finite") if ((n <- sum(x)) == 0) stop("at least one entry of x must be positive") #If x is matrix, do test of independence if (is.matrix(x)) { #this block was the separate g.stat function cell.tot <- row.tot <- col.tot <- grand.tot <- 0 nrows<-nrow(x) ncols<-ncol(x) if (correct=="yates"){ # Do Yates' correction if(dim(x)[1]!=2 || dim(x)[2]!=2) # check for 2x2 matrix stop("Yates' correction requires a 2 x 2 matrix")...
2008 Dec 16
8
sliding window over a large vector
Hi all, I have a very large binary vector, I wish to calculate the number of 1's over sliding windows. this is my very slow function slide<-function(seq,window){ n<-length(seq)-window tot<-c() tot[1]<-sum(seq[1:window]) for (i in 2:n) { tot[i]<- tot[i-1]-seq[i-1]+seq[i] } return(tot) } this works well for for reasonably sized vectors. Does anybody know a way for large vectors ( length=12 million), im trying to avoid using C. Thanks, Chris
2009 Feb 08
5
glmmBUGS: logistic regression on proportional data
Hello, I am trying to run a logistic regression with random effects on proportional data in glmmBUGS. I am a newcomer to this package, and wondered if anyone could help me specify the model correctly. I am trying to specify the response variable, /yseed/, as # of successes out of total observations... but I suspect that given the error below, that is not correct. Also, Newsect should be a factor, whereas Newdist is continuous. Thanks, John Newdat<-data.frame(Newtree=rep(1:3, each=20), Newsect=rep(c("a","b"), each=10), Newdist=rep(1:5, 2),...
2005 Aug 24
2
Remove NAs from Barplot
...e missing in the vector math.bar, but are never missing for the vector apmxpmeet. The following sample code illustrates the issue. Using the code below to create the plot works fine. However, the following command is designed to place the data onto the plot: text(math.barplot, graph.max+5, format(tot), xpd = TRUE, col = c("blue", "orange") ) This does work, but, it also places 'NA's on the plot. Is there a way to place the data onto the plot such that the numbers appear, but for the NAs not to appear? I've searched through ?text but was not able to find a solut...
2011 Jun 15
3
[PATCH] virtio-net: per cpu 64 bit stats
...skb->len; + stats->rx_packets++; + u64_stats_update_begin(&stats->syncp); if (hdr->hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { pr_debug("Needs csum!\n"); @@ -515,11 +531,16 @@ static unsigned int free_old_xmit_skbs(s { struct sk_buff *skb; unsigned int len, tot_sgs = 0; + struct virtnet_stats __percpu *stats = this_cpu_ptr(vi->stats); while ((skb = virtqueue_get_buf(vi->svq, &len)) != NULL) { pr_debug("Sent skb %p\n", skb); - vi->dev->stats.tx_bytes += skb->len; - vi->dev->stats.tx_packets++; + + u64_stats_upda...
2011 Jun 15
3
[PATCH] virtio-net: per cpu 64 bit stats
...skb->len; + stats->rx_packets++; + u64_stats_update_begin(&stats->syncp); if (hdr->hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { pr_debug("Needs csum!\n"); @@ -515,11 +531,16 @@ static unsigned int free_old_xmit_skbs(s { struct sk_buff *skb; unsigned int len, tot_sgs = 0; + struct virtnet_stats __percpu *stats = this_cpu_ptr(vi->stats); while ((skb = virtqueue_get_buf(vi->svq, &len)) != NULL) { pr_debug("Sent skb %p\n", skb); - vi->dev->stats.tx_bytes += skb->len; - vi->dev->stats.tx_packets++; + + u64_stats_upda...
2010 May 20
6
writing function
Dear group, I am trying to write functions, but as a beginner, everything is not so obvious. Let's say I want the results in a list of elemts like this : tot1, tot2, etc Here is a function: toto <- function(x,y) { for(i in x:y){ paste(c("tot",i),collapse="")<-(i*2) } } If I type this : >toto(1,5) I get this message error: Error in paste(c("tot", i), collapse = "") <- (i * 2) : target of assi...
2009 Sep 01
4
[LLVMdev] TOT broken
The buildbots are unhappy again. :-( Specifically, the "llvm-gcc-i386-darwin9" buildbot here at Apple last compiled TOT successfully yesterday morning (31aug); that was revision 80586. By revision 80589, the bootstrap failed due to a miscompare, and by revision 80610, it's aborting while compiling little pieces of libgcc. 80586 built O.K. (about 8AM, Pacific Standard Time, on Monday 31aug) ... 80589 boot...
2011 Dec 09
3
ggplot with geom_tile
Dear R-users, I am trying to make a plot with ggplot-geom_tile(), but cannot remove some unwanted (white) lines through my plot. Below a reproducible example: ##### library(ggplot2) tot=as.data.frame(rep(seq(-50,50,5),each=21)) names(tot)="precip" temp=rep(seq(-5,5,0.5),21) tot$temp=temp disc=array(dim=c(21,21)) for(i in 1:21){ for(y in 1:21){ temp<- rev(seq(10000+((i-1)*500),12000+((i-1)*500),100)) disc[i,y]=temp[y] }} disc1=t(disc) bla=as.vector(disc1...
2007 Apr 12
1
GLM with random effects
Hi R-Users, I have 3 replicates ('Replicate) of counts of parasites ('nor.tot.lep') before and after an experiment ('In.Out'). I am trying to treat the three replicates as a random effect in order to determine if the main effect (In.Out) significantly influences my dependent variable (nor.tot.lep) after the variance explained by the replicates is accounted f...
2010 Nov 18
0
[LLVMdev] tot clang/llvm and tot gcc performance comparision
On Nov 17, 2010, at 11:14 PM, Duncan Sands wrote: > Hi Evan, > >> Thanks David. Unfortunately many of us cannot use GPL v3 gcc so it's hard for us >> to investigate this. One question, can you tell if gcc is inlining significantly >> more than llvm? We have reports that this is one of the issue plaguing eon >> performance. > > are you allowed to look at
2008 Jan 28
1
R loops
I'm a new user and am having trouble with loops. In the following, I'm trying to add the results of "test" and the loops are not working. I've simplified the loop. What am I doing wrong? Thanks! > test<-numeric(20) > tot<-numeric(20) > for(i in 1:20){test[i]<-1} > for (i in 1:20){tot[i]<-(test[i]+tot[i])} > tot [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -- View this message in context: http://www.nabble.com/R-loops-tp15135671p15135671.html Sent from the R help mailing list archive at Nabble.co...
2009 Feb 12
3
Aggregrate function
Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to do. xveg is a data.frame with location, species, and total for the species. Each location is repeated, once for every species present at that location. For each location i want to find out which species has the maximum total ... so i've tried different ways to do it using aggregate. loc <- c(rep("L1", 3), rep("L2", 5), rep(&q...
2009 Jan 05
1
error message of RODBC...
...ova tabella terapia occupazionale mod.xls") > ## list the spreadsheets > sqlTables(channel) TABLE_CAT TABLE_SCHEM TABLE_NAME 1 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod <NA> 'emi tot 2006 OAI_60g TO FU1$' 2 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod <NA> 'emi tot 2006 OAI_60g TO FU2$' 3 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod <NA> 'emi tot 2006 OAI_60GG divisi$' 4 c:\\TABELLE DEFINITIVE\\nuova tabella...
2010 Nov 18
2
[LLVMdev] tot clang/llvm and tot gcc performance comparision
Hi Evan, > Thanks David. Unfortunately many of us cannot use GPL v3 gcc so it's hard for us > to investigate this. One question, can you tell if gcc is inlining significantly > more than llvm? We have reports that this is one of the issue plaguing eon > performance. are you allowed to look at assembler output by GPL v3 gcc? If so, maybe someone else can do the compiling for you,