search for: result1

Displaying 20 results from an estimated 82 matches for "result1".

Did you mean: result
2013 Oct 18
1
crr question‏ in library(cmprsk)
Hi all I do not understand why I am getting the following error message. Can anybody help me with this? Thanks in advance. install.packages("cmprsk") library(cmprsk) result1 <-crr(ftime, fstatus, cov1, failcode=1, cencode=0 ) one.pout1 = predict(result1,cov1,X=cbind(1,one.z1,one.z2)) predict.crr(result1,cov1,X=cbind(1,one.z1,one.z2)) Error: could not find function "predict.crr" [[alternative HTML version deleted]]
2006 Apr 21
5
Simple Question: How to merge SQL results?
Hopefully an easy one, how do I merge two or more SQL query results? Example: result1 = find_by_sql(x) result2 = find_by_sql(y) What is the best way to merge result1 and result2? I want to be able to reference the objects as if they were obtained via one query. Cheers, Dan
2010 Nov 09
2
Creating a list to store output objects from a recursive loop
Dear Group, I am having a function that I am running in a loop that generated two results for each loop The result1 is a zoo object The result2 is a data frame Now I want to put both of them in a list or some structure ... that I can access or output to a file after the loop is done. For e.g. for (i in 1:20){ niceFunction(x[i],i) } niceFunction (x,i) { result1 = someOperations() #zoo object result2 = so...
2010 Apr 30
2
deriving mean from specific cases
Hi all, I have a large dataset that has >10k entries. The dataset is stored in a dataframe with the headers: SubID Condition1 Condition2 Result1 Result2 There are multiple entries for a given SubID(Subject ID). Condition 1 has 3 levels and condition2 has 2 levels (therefore there are 6 possible combinations all together e.g. Cond1 Level1 x Cond2 Level 1 etc.) and i need to compute for 1. The mean for a subject of result1 and 2 for all the...
2012 Oct 16
2
Creating Optimization Constraints
...g M" M <- 100000 #Defining the Objective Function objective1<-function(x) { x1<-x[1] x2<-x[2] M*(s1(c(x1,x2)))+M*(s2(c(x1,x2))) + M*(s3(c(x1,x2))) + (1/3)*m1(c(x1,x2)) + (1/3)*abs(m2(c(x1,x2))-10) + (1/3)*(100-m3(c(x1,x2)))} #Optimization result1 <- nlminb(start=c(-0.3976,1.5541), objective1, gradient = NULL, hessian = NULL, lower = c(-1.682,-1.682), upper = c(1.682,1.682)) result1$objective m1(c(result1$par)) m2(c(result1$par)) m3(c(result1$par)) s1(c(result1$par)) s2(c(result1$par)) s3(c(result1$par)) Thanks for any help, Greg
2007 Jul 12
1
sub-function default arguments
...iable called nm1 is created; it is a matrix. f2 takes a matrix argument, and I defined f2 (schematically) as follows: f2<-function(nmArg1=nm1,...){nC<-ncol(nmArg1); ... } so that it expects nm1 as the default value of its argument. f1 is defined (schematically) as: f1<-function(...){result1<-f2(); ... } When I ran f1 I got the following error message: Error in ncol(nmArg1) : object "nm1" not found. If I redefine f1 schematically as: f1<-function(...){result1<-f2(nmArg1=nm1); ... } it runs okay. If I have nm1 defined outside of f1 and I run "result1<-f2...
2013 Sep 24
2
[LLVMdev] LLD: Returning true on success
...s an example documented to return true if there was an error parsing the string. > > I think it makes a lot of sense in this case. The idea is that you increase indentation in the "error" case. Consider parsing 2 numbers and returning their sum: > > if (S1.getAsInteger(16, Result1)) { > // report failure > } > if (S2.getAsInteger(16, Result2)) { > // report failure > } > return Result1 + Result2; > > vs. > > if (S1.getAsIntegerTrueOnSuccess(16, Result1)) { > if (S2.getAsIntegerTrueOnSuccess(16, Result2)) { > return Result1 + Result...
2004 Apr 07
2
Help with character columns in a table
I have done a read.table on a data file with the aim of extracting subsets of the data eg table[table$desc = 'result1',] How can I convert $desc to a character type? At present it is seen by typeof() as an integer. How can I do the equivalent of table[table$desc = 'result1' && table$amt > 20, ] Thanks, Rory -- Rory Campbell-Lange <rory at campbell-lange.net> <www.campbel...
2010 Jan 21
1
why scores are different in rda() and princomp()
hello, I am doing PCA in R using some habitat factors, and I used the function result1=rda() and result2=princomp(),then pick up scores of the result1 and result2 using scores(),but the scores are significantly different,i do not know the meaning of it. Best wishes! Cheng...
2011 Nov 15
3
Create a function with multiple object as an output
I've seen some questions regarding the output of multiple objects from a function, however the suggestions all end up suggesting the use of return(list(result1=result1, result2=result2 , result3=result3)). How can I return multiple objects that are 2 big to be added to a list? -- View this message in context: http://r.789695.n4.nabble.com/Create-a-function-with-multiple-object-as-an-output-tp4074226p4074226.html Sent from the R help mailing list archiv...
2013 Sep 24
0
[LLVMdev] LLD: Returning true on success
...sInteger() is an example documented to return true if there > was an error parsing the string. > I think it makes a lot of sense in this case. The idea is that you increase indentation in the "error" case. Consider parsing 2 numbers and returning their sum: if (S1.getAsInteger(16, Result1)) { // report failure } if (S2.getAsInteger(16, Result2)) { // report failure } return Result1 + Result2; vs. if (S1.getAsIntegerTrueOnSuccess(16, Result1)) { if (S2.getAsIntegerTrueOnSuccess(16, Result2)) { return Result1 + Result2; } else { // report failure } } else { // report f...
2009 Oct 15
1
tapply() and using factor() on a factor
Dear List, Shouldn't result1 and result2 be equal in the following case? Note that log$RequestID is a factor. That is, is.factor(log$RequestID) yields TRUE. result1 <- tapply(log$Flag,factor(log$RequestID),sum) result2 <- tapply(log$Flag,log$RequestID,sum) Yet, when I summarize the output, I get the followi...
2010 Aug 17
1
MySQL Connect problem...
....0.1 geraint xxx amis2) exten => s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\ (caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\ VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12)) exten => s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID()) exten => s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1) exten => s,n,MYSQL(Clear ${RESULT1}) exten => s,n,MYSQL(Disconnect ${DB1}) exten => s,n,MixMonitor(${VALUE1}.wav) exten => s,n,Set(CALLERID(all)=xxx) exten => s,n,Dial(SIP/prov1/${ARG1}) in a macr...
2013 Sep 24
3
[LLVMdev] LLD: Returning true on success
On Sep 24, 2013, at 12:40 PM, Michael Spencer <bigcheesegs at gmail.com> wrote: > On Tue, Sep 24, 2013 at 12:33 PM, Rui Ueyama <ruiu at google.com> wrote: > Hi LLD developers, > > I'm about to make a change to invert the return value of Driver::parse() to return true on success. Currently it returns false on success. > > In many other functions, we return true
2013 Sep 25
0
[LLVMdev] LLD: Returning true on success
...to return true if >> there was an error parsing the string. >> > > I think it makes a lot of sense in this case. The idea is that you > increase indentation in the "error" case. Consider parsing 2 numbers and > returning their sum: > > if (S1.getAsInteger(16, Result1)) { > // report failure > } > if (S2.getAsInteger(16, Result2)) { > // report failure > } > return Result1 + Result2; > > vs. > > if (S1.getAsIntegerTrueOnSuccess(16, Result1)) { > if (S2.getAsIntegerTrueOnSuccess(16, Result2)) { > return Result1 + Result2;...
2011 Jan 18
3
error message
...)) + s4<-matrix(nrow=nrow(s3),ncol=10) + rownames(s4)<-rownames(s3) + s4<-data.frame(s4) + for(i in seq(nrow(s3))){ + s4[i,1]<-s3[i,1+ind[i,1]] + s4[i,2:10]<-s3[i,11+ind[i,2:10]] + } + colnames(s2)<-colnames(s4) + rbind(s2,s4)[order(as.numeric(rownames(rbind(s2,s4)))),] + } > result1<-vector("list",1000) > for(i in 1:1000)result1[[i]]<-crossed1(ago) These syntaxes worked out perfectly. I successfully drew 1000 random samples. I applied the syntax above to another data set called agr, which basically has the same column names: > names(agr) [1] "SubI...
2008 Sep 11
1
how to calcaulate matrices for two subsets
I am an R beginner and trying to run a market model using event study in R framework. First, I run a market model, that is lm(stock security~SP500 index, subset=Obs[197, 396]) ->result1 Then I get predict results for a new dataset using predict (result1, newdata=Obs[397,399]) ->pred1 Pred1 should have three numbers. Now I need to calculate abnormal return by the formula stock security [397,399] -pred1 But it does not work after trying many times. So, how to write a...
2007 Aug 12
5
stubbing a method that yeilds sequential results
...esult = result end end yield @saved_result unless @saved_result.nil? end def results_match(this, last) return false if last.nil? .... end end I can''t for the life of me see how I should spec this though, as trying: Connector.stub!(:results).and_yield(@result1, @result2) is expecting the two results to be yielded at the same time and not sequentially. I can''t see how to stub a method to yield sequential results so I can spec the behavior for different scenarios of similarities between subsequent results. Is it possible to do this? Any h...
2013 Nov 04
0
[LLVMdev] conditional flow resulting in "Instruction does not dominate all uses!"
Well, what I had in mind was actually something like the following: entry: result0 = invoke func0 to defer_block unwind landing0 landing0: landingpad result1 = invoke func1 to defer_block unwind landing1 landing1: landingpad br defer_block defer_block: result = phi [ result0, entry ], [ result1, landing0 ], [ null, landing1 ] ... This doesn't have landing pads with multiple predecessors like he said, but I don't think that would make...
2013 Nov 04
2
[LLVMdev] conditional flow resulting in "Instruction does not dominate all uses!"
On 4 November 2013 08:19, Henrique Santos <henrique.nazare.santos at gmail.com> wrote: > Well, what I had in mind was actually something like the following: > > entry: > result0 = invoke func0 to defer_block unwind landing0 > > landing0: > landingpad > result1 = invoke func1 to defer_block unwind landing1 > > landing1: > landingpad > br defer_block > > defer_block: > result = phi [ result0, entry ], [ result1, landing0 ], [ null, landing1 ] > ... > > This doesn't have landing pads with multiple predecessors like...