Skip to content

Commit

Permalink
R fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MecBoc committed Dec 18, 2019
1 parent 4286823 commit a9b1632
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions RScripts/selemix/IS2_selemix.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#
rm(list=ls())
library("SeleMix")
library("jsonlite")
library("rjson")

# Lista Ruoli
#0 SKIP N VARIABILE NON UTILIZZATA
Expand Down Expand Up @@ -155,14 +155,15 @@ is2_mlest <- function( workset, roles, wsparams=NULL,...) {
#output parameters
report <- list(n.outlier = sum(est$outlier), missing = sum(as.numeric(est$pattern)), is.conv = est$is.conv, sing = est$sing, bic.aic = est$bic.aic)
mod <- list(B=est$B, sigma=est$sigma, lambda=est$lambda, w=est$w )
#param_mod <- list( MODEL = toJSON(mod))
param_mod <- mod
param_mod <- list( Model = toJSON(mod))
#param_mod <- mod

# param_report <- list( REPORT = toJSON(report))
param_report <- report
param_report <- list( Report = toJSON(report))
#param_report <- report
#setting output roles

roles <- list (P= c(roles$X,roles$Y, predname,names(outp)), O="outlier", M=names(mod), G=names(report))
#roles <- list (P= c(roles$X,roles$Y, predname,names(outp)), O="outlier", M=names(mod), G=names(report))
roles <- list (P= c(roles$X,roles$Y, predname,names(outp)), O="outlier", M="Model",G="Report")
r_out<-cbind(x,y,outp,out1)
rolesgroup <- list (P= c("P", "O"), M="M",G="G")
print(rolesgroup)
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/it/istat/is2/workflow/engine/EngineR.java
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,9 @@ public void prepareEnv() {
public void processOutput() throws Exception {
getGenericOutput(worksetOut, RESULTSET, WORKSET_OUT);
getGenericOutput(rolesOut, RESULTSET, ROLES_OUT);
getGenericOutput(worksetOut, RESULTSET, PARAMETERS_OUT);
getGenericOutput(worksetOut, RESULTSET, REPORT_OUT);
getGenericParamterOutput(parameterOut, RESULTSET, PARAMETERS_OUT);
getGenericParamterOutput(parameterOut, RESULTSET, REPORT_OUT);
//getGenericOutput(worksetOut, RESULTSET, REPORT_OUT);
getRolesGroup(rolesGroupOut, RESULTSET, ROLES_GROUP_OUT);
writeLogScriptR();
saveOutputDB();
Expand Down

0 comments on commit a9b1632

Please sign in to comment.