From d90a29f017d5dd307c0fe33a57f62dcdade1637b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Holl=C3=B3s?= Date: Mon, 18 Nov 2019 13:20:37 +0100 Subject: [PATCH] fixing musoSensi bug --- RBBGCMuso/R/musoSensi.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RBBGCMuso/R/musoSensi.R b/RBBGCMuso/R/musoSensi.R index 20e7607..3e471ca 100644 --- a/RBBGCMuso/R/musoSensi.R +++ b/RBBGCMuso/R/musoSensi.R @@ -44,9 +44,11 @@ musoSensi <- function(monteCarloFile = NULL, }} doSensi <- function(M){ + browser() npar <- ncol(M)-1 M <- M[which(!is.na(M[,ncol(M)])),] y <- M[,(npar+1)] + colnames(M) <- gsub("\\.epc","-epc",colnames(M)) M <- M[,colnames(M) %in% parameters[,1]] npar <- ncol(M) M <- apply(M[,1:npar],2,function(x){x-mean(x)}) @@ -103,6 +105,7 @@ musoSensi <- function(monteCarloFile = NULL, yInd <- grep("mod.", colnames(M))[varIndex] parNames <- grep("mod.",colnames(M), invert=TRUE, value = TRUE) M <- M[,c(grep("mod.", colnames(M),invert=TRUE),yInd)] + # browser() return(doSensi(M)) } }