general_histogram.R 821 Bytes
Newer Older
pxp9's avatar
pxp9 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
rm(list=ls())

setwd("C:/Users/victor/Desktop/TFG/r-analytics-master")

source("required_folder_checker.R")
source("argument_hasher.R")
source("dependency_installer.R")
source("connection_parameters.R")
source("necessary_function_table1s.R")

dep_list = c("jsonlite", "stringr","DSI","DSOpal","DSLite", "fields", "metafor", "ggplot2", "gridExtra", "data.table", "dsBaseClient")
install_dependencies(dep_list)


dir.create("./demographic_analisis", showWarnings = FALSE)
setwd("./demographic_analisis")


aux <- connect()
connections <- aux[[1]]
inp <- aux[[2]]

hasOutput  <- checkHasOutput(inp)

name <- getHname(inp)

png(paste(name,".png",sep=""),width=800, height=400)

res <- obtainData(connections, hasOutput, inp)

print(res)
dev.off()

datashield.logout(connections) 

res