fix the oTableMaker bug

This commit is contained in:
hollorol 2018-05-05 08:15:18 +02:00
parent d672205c6c
commit a903bd2f8b
2 changed files with 8 additions and 3 deletions

View File

@ -27,7 +27,10 @@ OtableMaker <- function(parametersReal){
mutate(MIN=OTFzero$MIN,MAX=OTFzero$MAX) mutate(MIN=OTFzero$MIN,MAX=OTFzero$MAX)
sliced <- constMatrix %>% sliced <- constMatrix %>%
dplyr::filter(GROUP %in% groupIDs) dplyr::filter(GROUP %in% groupIDs)
slicedIndexes<- which(sliced[,"INDEX"] %in% intersect(sliced[,"INDEX"],otfIndexes))
sliced[slicedIndexes,c("MIN","MAX")] <- OTF[which(OTF["GROUP"] == groupIDs),c("MIN","MAX")]
OTbig <- rbind(OT0,sliced) %>% data.frame() OTbig <- rbind(OT0,sliced) %>% data.frame()
parnumbers <- nrow(OTbig) parnumbers <- nrow(OTbig)
@ -36,7 +39,7 @@ OtableMaker <- function(parametersReal){
OTbig[i,3] <- OTF[OTF$INDEX==OTbig[i,1],2] OTbig[i,3] <- OTF[OTF$INDEX==OTbig[i,1],2]
OTbig[i,4] <- OTF[OTF$INDEX==OTbig[i,1],3] OTbig[i,4] <- OTF[OTF$INDEX==OTbig[i,1],3]
if(OTbig$Type[i]==2){ if(OTbig$Type[i]==2){
OTbig$DEPENDENCE[i] <-2 OTbig$DEPENDENCE[i] <- 2
} }
} }
} }
@ -47,4 +50,5 @@ OtableMaker <- function(parametersReal){
select(nGroup,TYPE) select(nGroup,TYPE)
return(list(Otable=OTbig,driver=summaries)) return(list(Otable=OTbig,driver=summaries))
} }

View File

@ -44,3 +44,4 @@ musoMappingFind <- function(variable=NULL){
mMapping[grep(variable,mMapping[,2]),] mMapping[grep(variable,mMapping[,2]),]
} }
} }