Skip to content

Commit ec365a2

Browse files
authored
Apply suggestions from code review
1 parent fae978e commit ec365a2

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

apps/api/R/ma.R

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ library("PEcAn.all")
33
library("RCurl")
44

55
#' Post a settings file for running a Meta-Analysis
6-
#' @param req Send pecan.xml in bodyas xml filetype
6+
#' @param req Send pecan.xml in body as xml filetype
77
#' @return A list of post.distns.MA.R
88
#' @author Nihar Sanda
99
#* @post /run
@@ -51,13 +51,7 @@ submitWorkflow <- function(req, res){
5151
filepath <- paste0(settings$pfts$pft$outdir, "/post.distns.Rdata")
5252
e <- new.env(parent = emptyenv())
5353
load(filepath, envir = e)
54-
objs <- ls(envir = e, all.names = TRUE)
55-
for(obj in objs) {
56-
data <- get(obj, envir =e)
57-
}
58-
#csv_file <- paste0(settings$pfts$pft$outdir, '/post.distns.csv')
59-
#plumber::include_file(csv_file, res)
60-
return(list(status = "Meta Analysis ran successfully", data=data))
54+
return(list(status = "Meta Analysis ran successfully", data = as.list(e))
6155
}
6256
}
6357
else{

0 commit comments

Comments
 (0)