search for: yes2

Displaying 3 results from an estimated 3 matches for "yes2".

Did you mean: yes
2023 Nov 06
0
I need to create new variables based on two numeric variables and one dichotomize conditional category
...0:1, log(-1:0), 1:2) Warning in log(-1:0) : NaNs produced [1] 1 -Inf > ifelse(c(FALSE,FALSE), log(-1:0), 1:2) [1] 1 2 I agree that nested ifelse is cumbersome. I wrote a function to address that: #' Nested conditional element selection #' #' \code{ifelses(test1,yes1,test2,yes2,....,no)} is shorthand for #' \code{ifelse(test1,yes1,ifelse(test2,yes2,....,no....))}. The inputs should #' not be named. #' #' @param test1 usually \code{test} for the outer call to \code{\link{ifelse}} #' @param yes1 \code{yes} for the outer call to \code{ifelse} #'...
2010 Jul 12
0
Error in storage.mode(test) <- "logical"
...09') #puts dfc data into table mydata str(dataset) #this works and gives correct values HGlt102009=dataset[,6] HGBL10_F_2007 =dataset[,11] HGmt122009=dataset[,7] HGBL12_F_2007 = dataset[,16] URRmt65Perc2009 = dataset[,3] URRG65_F_2007=dataset[,22] yes1=HGlt102009-HGBL10_F_2007 no1=HGlt102009-2 yes2=HGmt122009-HGBL12_F_2007 no2=HGmt122009-26 yes3=URRG65_F_2007-URRmt65Perc2009 no3=96-URRmt65Perc2009 Analysis2009 <- transform(dataset , HGBlt10_Natl_Ave_or_Facility = recode(HGBL10_F_2007,"0:2='National'; else='Facility'") , HGBmt12_Natl_Ave_or_Facility = recode(HGBL...
2013 Jan 08
0
bagging SVM Ensemble
...ision.values=F) prediction3<- predict(modelrad,newdata=testset, decision.values=F) prediction4<- predict(modeltan,newdata=testset, decision.values=F) no1<-sum(prediction1==0) yes1<-sum(prediction1==1) vote1<-c() if(yes1>no1) vote1<-1 else vote1<-0 no2<-sum(prediction2==0) yes2<-sum(prediction2==1) vote2<-c() if(yes2>no2) vote2<-1 else vote2<-0 no3<-sum(prediction3==0) yes3<-sum(prediction3==1) vote3<-c() if(yes3>no3) vote3<-1 else vote3<-0 no4<-sum(prediction4==0) yes4<-sum(prediction4==1) vote4<-c() if(yes4>no4) vote4<-1 e...